diff options
| author | Eric N. Vander Weele <ericvw@gmail.com> | 2019-11-09 09:55:01 +0800 |
|---|---|---|
| committer | Eric N. Vander Weele <ericvw@gmail.com> | 2019-11-22 11:04:40 -0500 |
| commit | 594c16abb42ef89e36db1701d5f1aa860f4db68d (patch) | |
| tree | 9b7d79caab28e834d582abeae467f6b45b4a6e71 /src/flake8/api | |
| parent | c9209507a89ef8ff96cdb01af1b0937b6ec42402 (diff) | |
| download | flake8-594c16abb42ef89e36db1701d5f1aa860f4db68d.tar.gz | |
application: Remove configuration finder state
This change removes the `.config_finder` object from the `Application`.
Since the configuration finder is only needed during initialization, we
constrain the finder to be returned and passed to other methods
necessary for initialization.
Diffstat (limited to 'src/flake8/api')
| -rw-r--r-- | src/flake8/api/legacy.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index b8c69c5..ac3fabb 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -30,12 +30,14 @@ def get_style_guide(**kwargs): application = app.Application() prelim_opts, remaining_args = application.parse_preliminary_options([]) flake8.configure_logging(prelim_opts.verbose, prelim_opts.output_file) - application.config_finder = application.make_config_finder( + config_finder = application.make_config_finder( application.program, prelim_opts.append_config ) - application.find_plugins(prelim_opts.config, prelim_opts.isolated) + application.find_plugins( + config_finder, prelim_opts.config, prelim_opts.isolated + ) application.register_plugin_options() - application.parse_configuration_and_cli(remaining_args) + application.parse_configuration_and_cli(config_finder, remaining_args) # We basically want application.initialize to be called but with these # options set instead before we make our formatter, notifier, internal # style guide and file checker manager. |
