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:
Eric N. Vander Weele 2020-01-12 15:33:54 -08:00
parent 77b2506071
commit 1e3bad20dd
8 changed files with 19 additions and 35 deletions

View file

@ -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) == [

View file

@ -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)

View file

@ -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()

View file

@ -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)