mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 05:54:17 +00:00
Remove unused 'cli_config' parameter
Now that `ConfigFileFinder.config_file` attribute is used everywhere and is constructed from the `--config` CLI option, the now unused `cli_config` parameters can be safely removed.
This commit is contained in:
parent
77b2506071
commit
1e3bad20dd
8 changed files with 19 additions and 35 deletions
|
|
@ -35,7 +35,7 @@ def test_aggregate_options_with_config(optmanager):
|
|||
[],
|
||||
config_file=CLI_SPECIFIED_CONFIG)
|
||||
options, args = aggregator.aggregate_options(
|
||||
optmanager, config_finder, CLI_SPECIFIED_CONFIG, arguments)
|
||||
optmanager, config_finder, arguments)
|
||||
|
||||
assert options.select == ['E11', 'E34', 'E402', 'W', 'F']
|
||||
assert options.ignore == ['E123', 'W234', 'E111']
|
||||
|
|
@ -50,7 +50,7 @@ def test_aggregate_options_when_isolated(optmanager):
|
|||
'flake8', [], ignore_config_files=True)
|
||||
optmanager.extend_default_ignore(['E8'])
|
||||
options, args = aggregator.aggregate_options(
|
||||
optmanager, config_finder, None, arguments)
|
||||
optmanager, config_finder, arguments)
|
||||
|
||||
assert options.select == ['E11', 'E34', 'E402', 'W', 'F']
|
||||
assert sorted(options.ignore) == [
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def test_get_local_plugins_uses_cli_config():
|
|||
config_file_value = 'foo.ini'
|
||||
config_finder.config_file = config_file_value
|
||||
|
||||
config.get_local_plugins(config_finder, cli_config=config_file_value)
|
||||
config.get_local_plugins(config_finder)
|
||||
|
||||
config_finder.cli_config.assert_called_once_with(config_file_value)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ def test_get_style_guide():
|
|||
|
||||
application.assert_called_once_with()
|
||||
mockedapp.parse_preliminary_options.assert_called_once_with([])
|
||||
mockedapp.find_plugins.assert_called_once_with(config_finder, None)
|
||||
mockedapp.find_plugins.assert_called_once_with(config_finder)
|
||||
mockedapp.register_plugin_options.assert_called_once_with()
|
||||
mockedapp.parse_configuration_and_cli.assert_called_once_with(
|
||||
config_finder, None, [])
|
||||
config_finder, [])
|
||||
mockedapp.make_formatter.assert_called_once_with()
|
||||
mockedapp.make_guide.assert_called_once_with()
|
||||
mockedapp.make_file_checker_manager.assert_called_once_with()
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ def test_parse_uses_cli_config(optmanager):
|
|||
config_finder.ignore_config_files = False
|
||||
parser = config.MergedConfigParser(optmanager, config_finder)
|
||||
|
||||
parser.parse(cli_config=config_file_value)
|
||||
parser.parse()
|
||||
config_finder.cli_config.assert_called_once_with(config_file_value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue