rework plugin loading

This commit is contained in:
Anthony Sottile 2021-12-31 13:11:00 -08:00
parent 38c5eceda9
commit 50d69150c1
36 changed files with 1277 additions and 1505 deletions

View file

@ -0,0 +1,17 @@
from flake8.main import options
def test_stage1_arg_parser():
stage1_parser = options.stage1_arg_parser()
opts, args = stage1_parser.parse_known_args(
["--foo", "--verbose", "src", "setup.py", "--statistics", "--version"]
)
assert opts.verbose
assert args == ["--foo", "src", "setup.py", "--statistics", "--version"]
def test_stage1_arg_parser_ignores_help():
stage1_parser = options.stage1_arg_parser()
_, args = stage1_parser.parse_known_args(["--help", "-h"])
assert args == ["--help", "-h"]