mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Fixes #66
flake8 will defer to local configurations first but then will check global per-user configuration
This commit is contained in:
parent
42231ff1ec
commit
5ab98117ba
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ def get_parser():
|
||||||
|
|
||||||
|
|
||||||
def read_config(opts, opt_parser):
|
def read_config(opts, opt_parser):
|
||||||
configs = ('.flake8', '.pep8', 'tox.ini', 'setup.cfg',)
|
configs = ('.flake8', '.pep8', 'tox.ini', 'setup.cfg',
|
||||||
|
os.path.expanduser(r'~\.flake8'),
|
||||||
|
os.path.join(os.path.expanduser('~/.config'), 'flake8')
|
||||||
parser = ConfigParser()
|
parser = ConfigParser()
|
||||||
files_found = parser.read(configs)
|
files_found = parser.read(configs)
|
||||||
if not (files_found and parser.has_section('flake8')):
|
if not (files_found and parser.has_section('flake8')):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue