mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 21:44:18 +00:00
Match noqa for users with explanations
This makes the regular expression a bit more complex, and potentially slower, but it will fix the issue where users had noqa comments with colons followed by explanations. Closes #178
This commit is contained in:
parent
47e3e65cc1
commit
c0ddc54f2f
4 changed files with 13 additions and 1 deletions
|
|
@ -130,6 +130,7 @@ def test_should_report_error(select_list, ignore_list, error_code, expected):
|
|||
('E111', 'a = 1 # noqa, analysis:ignore', True),
|
||||
('E111', 'a = 1 # noqa analysis:ignore', True),
|
||||
('E111', 'a = 1 # noqa - We do not care', True),
|
||||
('E111', 'a = 1 # noqa: We do not care', True),
|
||||
])
|
||||
def test_is_inline_ignored(error_code, physical_line, expected_result):
|
||||
"""Verify that we detect inline usage of ``# noqa``."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue