move from allowlist to blocklist for mypy

This commit is contained in:
Anthony Sottile 2021-11-14 21:35:40 -08:00
parent 500e2de0a0
commit 411ff24392
11 changed files with 53 additions and 48 deletions

View file

@ -25,7 +25,7 @@ def f():
sys = sys
"""
tree = ast.parse(src)
checker = pyflakes_shim.FlakesChecker(tree, (), "t.py")
checker = pyflakes_shim.FlakesChecker(tree, [], "t.py")
message_texts = [s for _, _, s, _ in checker.run()]
assert message_texts == [
"F823 local variable 'sys' defined in enclosing scope on line 1 referenced before assignment", # noqa: E501