mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
Remove unused 'isolated' parameter
Now that `ConfigFileFinder.ignore_config_files` attribute is used everywhere and is constructed from the `--isolated` CLI option, the now unused `isolated` parameters can be safely removed.
This commit is contained in:
parent
3d546d448a
commit
c918e72496
8 changed files with 22 additions and 48 deletions
|
|
@ -7,8 +7,9 @@ from flake8.options import config
|
|||
def test_get_local_plugins_respects_isolated():
|
||||
"""Verify behaviour of get_local_plugins with isolated=True."""
|
||||
config_finder = mock.MagicMock()
|
||||
config_finder.ignore_config_files = True
|
||||
|
||||
local_plugins = config.get_local_plugins(config_finder, isolated=True)
|
||||
local_plugins = config.get_local_plugins(config_finder)
|
||||
|
||||
assert local_plugins.extension == []
|
||||
assert local_plugins.report == []
|
||||
|
|
|
|||
|
|
@ -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, False)
|
||||
mockedapp.find_plugins.assert_called_once_with(config_finder, None)
|
||||
mockedapp.register_plugin_options.assert_called_once_with()
|
||||
mockedapp.parse_configuration_and_cli.assert_called_once_with(
|
||||
config_finder, None, False, [])
|
||||
config_finder, None, [])
|
||||
mockedapp.make_formatter.assert_called_once_with()
|
||||
mockedapp.make_guide.assert_called_once_with()
|
||||
mockedapp.make_file_checker_manager.assert_called_once_with()
|
||||
|
|
|
|||
|
|
@ -145,9 +145,10 @@ def test_merge_user_and_local_config(optmanager, config_finder):
|
|||
def test_parse_isolates_config(optmanager):
|
||||
"""Verify behaviour of the parse method with isolated=True."""
|
||||
config_finder = mock.MagicMock()
|
||||
config_finder.ignore_config_files = True
|
||||
parser = config.MergedConfigParser(optmanager, config_finder)
|
||||
|
||||
assert parser.parse(isolated=True) == {}
|
||||
assert parser.parse() == {}
|
||||
assert config_finder.local_configs.called is False
|
||||
assert config_finder.user_config.called is False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue