mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
make sure flake8 is clean
This commit is contained in:
parent
fc026a5e8a
commit
ff8a99cd62
5 changed files with 17 additions and 10 deletions
|
|
@ -3,9 +3,10 @@ import re
|
|||
|
||||
def skip_warning(warning):
|
||||
# XXX quick dirty hack, just need to keep the line in the warning
|
||||
line = open(warning.filename).readlines()[warning.lineno-1]
|
||||
line = open(warning.filename).readlines()[warning.lineno - 1]
|
||||
return skip_line(line)
|
||||
|
||||
|
||||
def skip_line(line):
|
||||
return line.strip().lower().endswith('# noqa')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue