mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
move from allowlist to blocklist for mypy
This commit is contained in:
parent
500e2de0a0
commit
411ff24392
11 changed files with 53 additions and 48 deletions
4
tests/fixtures/config_files/local-plugin.ini
vendored
4
tests/fixtures/config_files/local-plugin.ini
vendored
|
|
@ -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
|
||||
|
|
|
|||
0
tests/integration/__init__.py
Normal file
0
tests/integration/__init__.py
Normal file
0
tests/integration/subdir/__init__.py
Normal file
0
tests/integration/subdir/__init__.py
Normal file
0
tests/unit/__init__.py
Normal file
0
tests/unit/__init__.py
Normal 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"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue