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
|
|
@ -21,7 +21,9 @@ def test_config_file_without_section_is_not_considered(tmp_path):
|
|||
|
||||
|
||||
def test_config_file_with_parse_error_is_not_considered(tmp_path, caplog):
|
||||
tmp_path.joinpath("setup.cfg").write_text("[error")
|
||||
# the syntax error here is deliberately to trigger a partial parse
|
||||
# https://github.com/python/cpython/issues/95546
|
||||
tmp_path.joinpath("setup.cfg").write_text("[flake8]\nx = 1\n...")
|
||||
|
||||
assert config._find_config_file(str(tmp_path)) is None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue