def valid_filename(filename):
 for postfix in IGNORED_POSTFIXES:
  if filename.endswith(postfix):
   return False
 for directory in IGNORED_DIRECTORIES:
  if filename.startswith(directory):
   return False
 return (filename.endswith('.py') and (filename not in IGNORED_FILES))

def valid_filename ( filename ) : for postfix in IGNORED_POSTFIXES : if filename . endswith ( postfix ) : return False for directory in IGNORED_DIRECTORIES : if filename . startswith ( directory ) : return False return ( filename . endswith ( '.py' ) and ( filename not in IGNORED_FILES ) )
checks if a file is a python file and is not ignored .