mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
config: Normalize paths in CLI-specified config relative to config dir
Paths specified in configuration files should be relative to the directory where the configuration file resides. Formerly, paths were normalized relative to the current working directory where `flake8` was invoked. The former behavior was not expected, especially for directory structures with subprojects each having their own configuration.
This commit is contained in:
parent
8be5a7294b
commit
563220b711
2 changed files with 8 additions and 7 deletions
|
|
@ -265,7 +265,7 @@ class MergedConfigParser(object):
|
|||
return {}
|
||||
|
||||
LOG.debug("Parsing CLI configuration files.")
|
||||
return self._parse_config(config)
|
||||
return self._parse_config(config, os.path.dirname(config_path))
|
||||
|
||||
def merge_user_and_local_config(self):
|
||||
"""Merge the parsed user and local configuration files.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue