def _run_checker_for_package(checker, package_name, extra_ignore=None):
 ignore_strings = IGNORE_ERRORS
 if extra_ignore:
  ignore_strings += extra_ignore
 package_path = path_for_import(package_name)
 for (root, dirs, files) in os.walk(str(package_path)):
  for f in files:
   if ((f == u'local_settings.py') or (not f.endswith(u'.py')) or (root.split(os.sep)[(-1)] in [u'migrations'])):
    continue
   for warning in checker(os.path.join(root, f)):
    for ignore in ignore_strings:
     if (ignore in warning):
      break
    else:
     (yield warning.replace(package_path, package_name, 1))

def _run_checker_for_package ( checker , package_name , extra_ignore = None ) : ignore_strings = IGNORE_ERRORS if extra_ignore : ignore_strings += extra_ignore package_path = path_for_import ( package_name ) for ( root , dirs , files ) in os . walk ( str ( package_path ) ) : for f in files : if ( ( f == u'local_settings.py' ) or ( not f . endswith ( u'.py' ) ) or ( root . split ( os . sep ) [ ( - 1 ) ] in [ u'migrations' ] ) ) : continue for warning in checker ( os . path . join ( root , f ) ) : for ignore in ignore_strings : if ( ignore in warning ) : break else : ( yield warning . replace ( package_path , package_name , 1 ) )
runs the checker function across every python module in the given package .