mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
Fixes #58
This commit is contained in:
parent
8a32526022
commit
42231ff1ec
1 changed files with 7 additions and 1 deletions
|
|
@ -123,7 +123,13 @@ def skip_warning(warning, ignore=[]):
|
||||||
|
|
||||||
|
|
||||||
def skip_line(line):
|
def skip_line(line):
|
||||||
|
def _noqa(line):
|
||||||
return line.strip().lower().endswith('# noqa')
|
return line.strip().lower().endswith('# noqa')
|
||||||
|
skip = _noqa(line)
|
||||||
|
if not skip:
|
||||||
|
i = line.rfind(' #')
|
||||||
|
skip = _noqa(line[:i]) if i > 0 else False
|
||||||
|
return skip
|
||||||
|
|
||||||
|
|
||||||
_NOQA = re.compile(r'flake8[:=]\s*noqa', re.I | re.M)
|
_NOQA = re.compile(r'flake8[:=]\s*noqa', re.I | re.M)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue