We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8a5841 commit c9bae48Copy full SHA for c9bae48
pyflakes/test/test_other.py
@@ -534,6 +534,18 @@ def a():
534
b = 2
535
''', m.UnusedVariable)
536
537
+ def test_variableUsedInLoop(self):
538
+ """
539
+ Shadowing a used variable cannot raise an UnusedVariable warning in the
540
+ context of a loop.
541
542
+ self.flakes('''
543
+ def a():
544
+ b = True
545
+ while b:
546
+ b = False
547
+ ''')
548
+
549
def test_assignToGlobal(self):
550
"""
551
Assigning to a global and then not using that global is perfectly
0 commit comments