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

@ -1,5 +1,5 @@
[flake8:local-plugins]
extension =
XE = test_plugins:ExtensionTestPlugin
XE = tests.integration.test_plugins:ExtensionTestPlugin
report =
XR = test_plugins:ReportTestPlugin
XR = tests.integration.test_plugins:ReportTestPlugin

View file

View file

0
tests/unit/__init__.py Normal file
View file

View file

@ -41,5 +41,9 @@ def test_get_local_plugins():
localcfs.return_value = [config_fixture_path]
local_plugins = config.get_local_plugins(config_finder)
assert local_plugins.extension == ["XE = test_plugins:ExtensionTestPlugin"]
assert local_plugins.report == ["XR = test_plugins:ReportTestPlugin"]
assert local_plugins.extension == [
"XE = tests.integration.test_plugins:ExtensionTestPlugin"
]
assert local_plugins.report == [
"XR = tests.integration.test_plugins:ReportTestPlugin"
]

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