viff

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 diff
     1.1 --- a/run.py	Wed Oct 08 23:05:43 2008 +0200
     1.2 +++ b/run.py	Thu Oct 09 10:04:05 2008 +0200
     1.3 @@ -209,10 +209,17 @@
     1.4  @command('pyflakes')
     1.5  def pyflakes():
     1.6      """Find static errors using Pyflakes."""
     1.7 +    pyfiles = []
     1.8 +    for root, dirs, files in os.walk('.'):
     1.9 +        pyfiles.extend([join(root, name) for name in files if name.endswith('.py')])
    1.10 +        if 'libs' in dirs:
    1.11 +            # Do not recurse into the 'viff/libs' directory.
    1.12 +            dirs.remove('libs')
    1.13 +
    1.14      if sys.platform == "win32":
    1.15 -        execute(['pyflakes.bat', '.'])
    1.16 +        execute(['pyflakes.bat'] + pyfiles)
    1.17      else:
    1.18 -        execute(['pyflakes', '.'])
    1.19 +        execute(['pyflakes'] + pyfiles)
    1.20  
    1.21  
    1.22  @command('trial', 'python')