Skip to content

Commit 70cedbc

Browse files
committed
Address code review. Simplify the loop . Don't need enumerate.
1 parent c8f20ea commit 70cedbc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎numba/tests/support.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ def assertRefCount(self, *objects):
269269
def assertRefCountEqual(self, *objects):
270270
gc.collect()
271271
rc = [sys.getrefcount(x) for x in objects]
272-
for i, x in enumerate(objects[1:], start=1):
273-
rc_0 = rc[0]
272+
rc_0 = rc[0]
273+
for i in range(len(objects))[1:]:
274274
rc_i = rc[i]
275275
if rc_0 != rc_i:
276276
self.fail(f"Refcount for objects does not match. "

0 commit comments

Comments
 (0)