make sure flake8 is clean

This commit is contained in:
Tarek Ziade 2011-11-09 14:48:02 +01:00
parent fc026a5e8a
commit ff8a99cd62
5 changed files with 17 additions and 10 deletions

View file

@ -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')