diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-05-28 07:54:07 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-05-28 11:57:18 -0500 |
| commit | 91e07ebcffc0d4ecc472bb0031113f6030f43a20 (patch) | |
| tree | 02e64b6e6c643c4709f19bf77b4663fc23ea8cca /flake8/main/cli.py | |
| parent | 50d74e3cce34e3047bcb24a2cf7cd85e5a7c1163 (diff) | |
| download | flake8-91e07ebcffc0d4ecc472bb0031113f6030f43a20.tar.gz | |
Refactor off-by-default plugins and enabling them
We move the logic to add or remove a plugin from the default ignore
list to individual methods on the Plugin class (Plugin#enable,
Plugin#disable) and use that when registering and parsing options.
If the plugin is off-by-default, Plugin#register_options will use
Plugin#disable. When parsing options via Plugin#provide_options, if
the plugin has been specified in --enable-extensions then it will be
re-enabled via Plugin#enable.
Diffstat (limited to 'flake8/main/cli.py')
| -rw-r--r-- | flake8/main/cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/flake8/main/cli.py b/flake8/main/cli.py index ef9b328..e9eedb7 100644 --- a/flake8/main/cli.py +++ b/flake8/main/cli.py @@ -34,7 +34,7 @@ def register_default_options(option_manager): - ``--disable-noqa`` - ``--show-source`` - ``--statistics`` - - ``--enabled-extensions`` + - ``--enable-extensions`` - ``--exit-zero`` - ``-j``/``--jobs`` - ``--output-file`` @@ -141,7 +141,7 @@ def register_default_options(option_manager): # Flake8 options add_option( - '--enabled-extensions', default='', parse_from_config=True, + '--enable-extensions', default='', parse_from_config=True, comma_separated_list=True, type='string', help='Enable plugins and extensions that are otherwise disabled ' 'by default', |
