mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 00:14:46 +00:00
Merge branch 'extra-config-normalization' into 'master'
Push down extra config file path normalization into main config handling See merge request pycqa/flake8!333
This commit is contained in:
commit
862b17d229
2 changed files with 2 additions and 9 deletions
|
|
@ -158,13 +158,10 @@ class Application(object):
|
||||||
def make_config_finder(self):
|
def make_config_finder(self):
|
||||||
"""Make our ConfigFileFinder based on preliminary opts and args."""
|
"""Make our ConfigFileFinder based on preliminary opts and args."""
|
||||||
if self.config_finder is None:
|
if self.config_finder is None:
|
||||||
extra_config_files = utils.normalize_paths(
|
|
||||||
self.prelim_opts.append_config
|
|
||||||
)
|
|
||||||
self.config_finder = config.ConfigFileFinder(
|
self.config_finder = config.ConfigFileFinder(
|
||||||
self.option_manager.program_name,
|
self.option_manager.program_name,
|
||||||
self.prelim_args,
|
self.prelim_args,
|
||||||
extra_config_files,
|
self.prelim_opts.append_config,
|
||||||
)
|
)
|
||||||
|
|
||||||
def find_plugins(self):
|
def find_plugins(self):
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,7 @@ class ConfigFileFinder(object):
|
||||||
"""
|
"""
|
||||||
# The values of --append-config from the CLI
|
# The values of --append-config from the CLI
|
||||||
extra_config_files = extra_config_files or []
|
extra_config_files = extra_config_files or []
|
||||||
self.extra_config_files = [
|
self.extra_config_files = utils.normalize_paths(extra_config_files)
|
||||||
# Ensure the paths are absolute paths for local_config_files
|
|
||||||
os.path.abspath(f)
|
|
||||||
for f in extra_config_files
|
|
||||||
]
|
|
||||||
|
|
||||||
# Platform specific settings
|
# Platform specific settings
|
||||||
self.is_windows = sys.platform == "win32"
|
self.is_windows = sys.platform == "win32"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue