# HG changeset patch # User Augie Fackler # Date 2011-05-06 15:17:07 # Node ID 08d84bdce1a5a52397a6fd1dd33537acf734e128 # Parent d62d597b8974574686b13dfb2f2c97500fa9212f pyflakes: ignore files marked no-check-code diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py --- a/tests/filterpyflakes.py +++ b/tests/filterpyflakes.py @@ -2,7 +2,7 @@ # Filter output by pyflakes to control which warnings we check -import sys, re +import sys, re, os def makekey(message): # "path/file:line: message" @@ -25,6 +25,12 @@ for line in sys.stdin: ] if not re.search('|'.join(pats), line): continue + fn = line.split(':', 1)[0] + f = open(os.path.join(os.path.dirname(os.path.dirname(__file__)), fn)) + data = f.read() + f.close() + if 'no-check-code' in data: + continue lines.append(line) for line in sorted(lines, key = makekey):