mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Enable ruff rule SIM113 (#147290)
Lint rules that tells the user to avoid keeping track of their own counter and use the builtin enumerate when possible. Pull Request resolved: https://github.com/pytorch/pytorch/pull/147290 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
a8fa4bcfd2
commit
e738f7ba23
@ -969,7 +969,7 @@ class TestGradTransform(TestCase):
|
||||
expected = f"{repr(x)}"
|
||||
level = 0
|
||||
for op in op_list:
|
||||
level += 1
|
||||
level += 1 # noqa: SIM113
|
||||
if op == grad:
|
||||
expected = f"GradTrackingTensor(lvl={level}, value={expected})"
|
||||
elif op == vmap:
|
||||
|
Reference in New Issue
Block a user