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.
This commit is contained in:
Eric N. Vander Weele 2019-10-12 22:04:55 +01:00
parent 5fc1d3def0
commit b3a31496b7

View file

@ -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