summaryrefslogtreecommitdiff
path: root/src/flake8/api
diff options
context:
space:
mode:
authorEric N. Vander Weele <ericvw@gmail.com>2019-12-29 17:22:26 -0500
committerEric N. Vander Weele <ericvw@gmail.com>2019-12-29 18:07:51 -0500
commit7f9f70064c50bbb6024fafed4568e0693f5640b5 (patch)
treea81485499d227115c26d3fadf3ed42302d67f413 /src/flake8/api
parentbb61b3df82a938f7cd1ca32daab4a31e4586b281 (diff)
downloadflake8-7f9f70064c50bbb6024fafed4568e0693f5640b5.tar.gz
aggregator: Forward --config and --isolated options during aggregation
This fixes a regression introduced in !346 to ensure that `--config` and `--isolated` are recognized in `aggregate_options()`. The regression manifested because `aggregate_options()` was relying on re-parsing `argv` to obtain the option values. However, !346 changed the preliminary parsing logic to only parse and "eat" what is necessary and forward along the options needed before all the configuration was loaded. This code path was overlooked because the tests in `test_aggregator()` were passing but the call from the `Application` object would never have these options in the remaining `argv` list to be passed long.
Diffstat (limited to 'src/flake8/api')
-rw-r--r--src/flake8/api/legacy.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py
index 2761163..fe3b405 100644
--- a/src/flake8/api/legacy.py
+++ b/src/flake8/api/legacy.py
@@ -39,7 +39,12 @@ def get_style_guide(**kwargs):
config_finder, prelim_opts.config, prelim_opts.isolated
)
application.register_plugin_options()
- application.parse_configuration_and_cli(config_finder, remaining_args)
+ application.parse_configuration_and_cli(
+ config_finder,
+ prelim_opts.config,
+ prelim_opts.isolated,
+ 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.