changeset 14209:08d84bdce1a5

pyflakes: ignore files marked no-check-code
author Augie Fackler <durin42@gmail.com>
date Fri, 06 May 2011 10:17:07 -0500
parents d62d597b8974
children 68ade2a6b30a
files tests/filterpyflakes.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/filterpyflakes.py	Thu May 05 18:05:24 2011 +0200
+++ b/tests/filterpyflakes.py	Fri May 06 10:17:07 2011 -0500
@@ -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 @@
            ]
     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):