From b3a31496b74fb0afb207d3bd10ec9cbf5be4640d Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Sat, 12 Oct 2019 22:04:55 +0100 Subject: [PATCH] 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. --- src/flake8/options/config.py | 4 +--- 1 file changed, 1 insertion(+), 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