diff options
| author | Eric N. Vander Weele <ericvw@gmail.com> | 2020-05-18 17:12:07 -0400 |
|---|---|---|
| committer | Eric N. Vander Weele <ericvw@gmail.com> | 2020-05-18 17:23:08 -0400 |
| commit | 563220b711a294a90472c49a795bc5eb0dbce93a (patch) | |
| tree | 79aeb8408f5ac607fa8858ae2c92b7a54f0661cf /src | |
| parent | 8be5a7294bcdc40248e483b8a1ca734471179eda (diff) | |
| download | flake8-563220b711a294a90472c49a795bc5eb0dbce93a.tar.gz | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/options/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py index c258fec..6c66d89 100644 --- a/src/flake8/options/config.py +++ b/src/flake8/options/config.py @@ -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. |
