summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric N. Vander Weele <ericvw@gmail.com>2019-10-12 22:04:55 +0100
committerEric N. Vander Weele <ericvw@gmail.com>2019-10-13 13:37:19 -0400
commitb3a31496b74fb0afb207d3bd10ec9cbf5be4640d (patch)
tree2a63c4e2f737386c1b9c324de94170679d8dc935 /src
parent5fc1d3def026f808e6d8a8d9dcce9a5246c7d423 (diff)
downloadflake8-b3a31496b74fb0afb207d3bd10ec9cbf5be4640d.tar.gz
config: Search for configuration relative to current working directory
This is the initial incision to only search for configuration relative to the current working directory where `flake8` is invoked. This brings configuration file detection closer to other CLI-like programs.
Diffstat (limited to 'src')
-rw-r--r--src/flake8/options/config.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py
index 9f3235d..5d80c25 100644
--- a/src/flake8/options/config.py
+++ b/src/flake8/options/config.py
@@ -46,9 +46,7 @@ class ConfigFileFinder(object):
self.local_directory = os.path.abspath(os.curdir)
- if not args:
- args = ["."]
- self.parent = self.tail = os.path.abspath(os.path.commonprefix(args))
+ self.parent = self.tail = os.getcwd()
# caches to avoid double-reading config files
self._local_configs = None