From d5f155d1cf0c093ef48f1c0e0bbcf9b5912543ce Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 5 Mar 2020 22:18:44 -0800 Subject: [PATCH] Replace xrange with range (#279) Summary: xrange is not in Python 3 Resolves https://github.com/facebook/chisel/issues/276 Pull Request resolved: https://github.com/facebook/chisel/pull/279 Reviewed By: jarman Differential Revision: D20300505 Pulled By: kolinkrewinkel fbshipit-source-id: 0ba6c4e822bea3f59853663f7aa285fcba46187b --- commands/FBXCTestCommands.py | 2 +- fblldbviewhelpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/FBXCTestCommands.py b/commands/FBXCTestCommands.py index 966ca31..39752c7 100644 --- a/commands/FBXCTestCommands.py +++ b/commands/FBXCTestCommands.py @@ -548,7 +548,7 @@ def children_list(self): :return: XCUIElement children list :rtype: list[lldb.SBValue] """ - return [self.children.GetChildAtIndex(i) for i in xrange(0, self.children_count)] + return [self.children.GetChildAtIndex(i) for i in range(self.children_count)] @property def enabled(self): diff --git a/fblldbviewhelpers.py b/fblldbviewhelpers.py index dd4b24d..a8235ee 100644 --- a/fblldbviewhelpers.py +++ b/fblldbviewhelpers.py @@ -72,7 +72,7 @@ def subviewsOfView(view): (view, level) = views.pop(0) subviews = fb.evaluateExpression('(id)[%s subviews]' % view) subviewsCount = int(fb.evaluateExpression('(int)[(id)%s count]' % subviews)) - for i in xrange(subviewsCount): + for i in range(subviewsCount): subview = fb.evaluateExpression('(id)[%s objectAtIndex:%i]' % (subviews, i)) views.append((subview, level+1)) yield (subview, level+1)