def run_pyflakes(no_warnings=False):
 files = list_files('.py')
 rval = {}
 for filepath in files:
  (output, rc) = run_shell_command(('pyflakes ' + filepath))
  output = output.decode(sys.getdefaultencoding())
  if (u'pyflakes: not found' in output):
   raise RuntimeError(((((("Couldn't run 'pyflakes " + filepath) + "'. Error code returned:") + str(rc)) + ' Output was: ') + output))
  output = _filter(output, no_warnings)
  if (output is not None):
   rval[filepath] = output
 return rval

def run_pyflakes ( no_warnings = False ) : files = list_files ( '.py' ) rval = { } for filepath in files : ( output , rc ) = run_shell_command ( ( 'pyflakes ' + filepath ) ) output = output . decode ( sys . getdefaultencoding ( ) ) if ( u'pyflakes: not found' in output ) : raise RuntimeError ( ( ( ( ( ( "Couldn't run 'pyflakes " + filepath ) + "'. Error code returned:" ) + str ( rc ) ) + ' Output was: ' ) + output ) ) output = _filter ( output , no_warnings ) if ( output is not None ) : rval [ filepath ] = output return rval
return a description of all errors pyflakes finds in pylearn2 .