mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
config: Switch code paths to use 'ConfigFileFinder.ignore_config_files'
Now that the `ConfigFileFinder` has the `.ignore_config_files` attribute, switch the relevant code paths to utilize this public attribute. Tests have been updated to either construct `ConfigFileFinder` or mock the object appropriately.
This commit is contained in:
parent
a5c17c1a19
commit
3d546d448a
4 changed files with 6 additions and 3 deletions
|
|
@ -307,7 +307,7 @@ class MergedConfigParser(object):
|
|||
:rtype:
|
||||
dict
|
||||
"""
|
||||
if isolated:
|
||||
if self.config_finder.ignore_config_files:
|
||||
LOG.debug(
|
||||
"Refusing to parse configuration files due to user-"
|
||||
"requested isolation"
|
||||
|
|
@ -344,7 +344,7 @@ def get_local_plugins(config_finder, cli_config=None, isolated=False):
|
|||
flake8.options.config.LocalPlugins
|
||||
"""
|
||||
local_plugins = LocalPlugins(extension=[], report=[], paths=[])
|
||||
if isolated:
|
||||
if config_finder.ignore_config_files:
|
||||
LOG.debug(
|
||||
"Refusing to look for local plugins in configuration"
|
||||
"files due to user-requested isolation"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue