mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
allow idiomatic setup.cfg comments
This commit is contained in:
parent
87198e50f1
commit
c34fd755f0
2 changed files with 12 additions and 2 deletions
|
|
@ -243,6 +243,15 @@ def test_invalid_ignore_codes_raise_error(tmpdir, opt_manager):
|
|||
assert msg == expected
|
||||
|
||||
|
||||
def test_ignore_code_comments_dont_raise_error(tmpdir, opt_manager):
|
||||
tmpdir.join("setup.cfg").write("[flake8]\nignore = E203, #comment")
|
||||
with tmpdir.as_cwd():
|
||||
cfg, _ = config.load_config("setup.cfg", [], isolated=False)
|
||||
|
||||
ret = config.parse_config(opt_manager, cfg, tmpdir)
|
||||
assert ret == {"ignore": ["E203"]}
|
||||
|
||||
|
||||
def test_invalid_extend_ignore_codes_raise_error(tmpdir, opt_manager):
|
||||
tmpdir.join("setup.cfg").write("[flake8]\nextend-ignore = E203, //comment")
|
||||
with tmpdir.as_cwd():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue