changeset 981:19013451fcdd

Make pyflakes avoid viff.libs package. We don't care about warnings to third-party libraries, and because of pyflakes bug 1499 we get spurious warnings like this: viff/libs/configobj.py:40: redefinition of unused 'BOM_UTF8' from line 36 viff/libs/configobj.py:42: redefinition of unused 'BOM_UTF16_LE' from line 36 viff/libs/configobj.py:44: redefinition of unused 'BOM_UTF16_BE' from line 36 viff/libs/configobj.py:47: redefinition of unused 'BOM_UTF16' from line 36 The pyflakes bug report: http://www.divmod.org/trac/ticket/1499
author Martin Geisler <mg@daimi.au.dk>
date Thu, 09 Oct 2008 10:04:05 +0200
parents 1f67c094cd7f
children ec70dc5ac213
files run.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/run.py	Wed Oct 08 23:05:43 2008 +0200
+++ b/run.py	Thu Oct 09 10:04:05 2008 +0200
@@ -209,10 +209,17 @@
 @command('pyflakes')
 def pyflakes():
     """Find static errors using Pyflakes."""
+    pyfiles = []
+    for root, dirs, files in os.walk('.'):
+        pyfiles.extend([join(root, name) for name in files if name.endswith('.py')])
+        if 'libs' in dirs:
+            # Do not recurse into the 'viff/libs' directory.
+            dirs.remove('libs')
+
     if sys.platform == "win32":
-        execute(['pyflakes.bat', '.'])
+        execute(['pyflakes.bat'] + pyfiles)
     else:
-        execute(['pyflakes', '.'])
+        execute(['pyflakes'] + pyfiles)
 
 
 @command('trial', 'python')