diff options
| author | Frank Winklmeier <fwinkl@users.noreply.github.com> | 2021-04-10 14:24:54 +0200 |
|---|---|---|
| committer | Frank Winklmeier <fwinkl@users.noreply.github.com> | 2021-04-11 20:40:53 +0200 |
| commit | f98afbf7d9b46a6c87a816d7459df1ba622498e0 (patch) | |
| tree | dcc2753ec1eec1cc9511b465f19c3065749ac0eb /src/flake8/main | |
| parent | 9815f49cc48dec39977ca4954beb833ba489f969 (diff) | |
| download | flake8-f98afbf7d9b46a6c87a816d7459df1ba622498e0.tar.gz | |
Add --extend-select command line argument
Implement `--extend-select` command line argument following what was
done for `--extend-ignore` in !233. This option can be used to
selectively add individual codes without overriding the default list
entirely.
Addresses the remaining item of issue #1061.
Diffstat (limited to 'src/flake8/main')
| -rw-r--r-- | src/flake8/main/options.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/flake8/main/options.py b/src/flake8/main/options.py index 3dfb482..6f44768 100644 --- a/src/flake8/main/options.py +++ b/src/flake8/main/options.py @@ -105,6 +105,7 @@ def register_default_options(option_manager): - ``--max-doc-length`` - ``--indent-size`` - ``--select`` + - ``--extend-select`` - ``--disable-noqa`` - ``--show-source`` - ``--statistics`` @@ -273,6 +274,18 @@ def register_default_options(option_manager): ) add_option( + "--extend-select", + metavar="errors", + default="", + parse_from_config=True, + comma_separated_list=True, + help=( + "Comma-separated list of errors and warnings to add to the list " + "of selected ones. For example, ``--extend-select=E4,E51,W234``." + ), + ) + + add_option( "--disable-noqa", default=False, parse_from_config=True, |
