diff options
author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2021-11-05 10:10:52 -0500 |
---|---|---|
committer | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2021-11-05 10:10:52 -0500 |
commit | 5694f6f3af357d3461db62912e08a4f4326f2859 (patch) | |
tree | 97a7c06f1ae0c12df5b10493566a8d0e0ed26960 /src/flake8/main/options.py | |
parent | 05cae7e046d515b8c2dceaa9c897f4c84c7ffb5f (diff) | |
download | flake8-plugin-loading.tar.gz |
Add --required-plugins and --allowed-pluginsplugin-loading
Closes #283
Closes #488
Diffstat (limited to 'src/flake8/main/options.py')
-rw-r--r-- | src/flake8/main/options.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/flake8/main/options.py b/src/flake8/main/options.py index c35dbc6..bc2464c 100644 --- a/src/flake8/main/options.py +++ b/src/flake8/main/options.py @@ -59,6 +59,23 @@ def register_preliminary_options(parser: argparse.ArgumentParser) -> None: help="Ignore all configuration files.", ) + add_argument( + "--allowed-plugins", + default=None, + # parse_from_config=True, + # comma_separated_list=True, + help="Which plugins are allowed to run from the environment", + ) + + add_argument( + "--required-plugins", + default=None, + # parse_from_config=True, + # comma_separated_list=True, + help="Which plugins are required for linting. Exits if not all are " + "present.", + ) + class JobsArgument: """Type callback for the --jobs argument.""" |