mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
ignore config files that partially parse as flake8 configs
This commit is contained in:
parent
70c0b3d27a
commit
25e8ff18b3
2 changed files with 4 additions and 2 deletions
|
|
@ -29,9 +29,9 @@ def _find_config_file(path: str) -> Optional[str]:
|
|||
home_stat = None
|
||||
|
||||
dir_stat = _stat_key(path)
|
||||
cfg = configparser.RawConfigParser()
|
||||
while True:
|
||||
for candidate in ("setup.cfg", "tox.ini", ".flake8"):
|
||||
cfg = configparser.RawConfigParser()
|
||||
cfg_path = os.path.join(path, candidate)
|
||||
try:
|
||||
cfg.read(cfg_path, encoding="UTF-8")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue