We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15a35c1 commit b1b2f36Copy full SHA for b1b2f36
pyflakes/test/test_other.py
@@ -1660,6 +1660,15 @@ def foo():
1660
except (tokenize.TokenError, IndentationError): pass
1661
''')
1662
1663
+ def test_exceptUnusedAsLocals(self):
1664
+ """
1665
+ Don't issue false warning when an exception is used by locals().
1666
1667
+ self.flakes('''
1668
+ try: raise ValueError()
1669
+ except ValueError as e: locals()
1670
+ ''')
1671
+
1672
def test_augmentedAssignmentImportedFunctionCall(self):
1673
"""
1674
Consider a function that is called on the right part of an
0 commit comments