def input_dir(self, dirname):
 dirname = dirname.rstrip('/')
 if self.excluded(dirname):
  return 0
 counters = self.options.report.counters
 verbose = self.options.verbose
 filepatterns = self.options.filename
 runner = self.runner
 for (root, dirs, files) in os.walk(dirname):
  if verbose:
   print ('directory ' + root)
  counters['directories'] += 1
  for subdir in sorted(dirs):
   if self.excluded(os.path.join(root, subdir)):
    dirs.remove(subdir)
  for filename in sorted(files):
   if (pep8.filename_match(filename, filepatterns) and (not self.excluded(filename))):
    runner(os.path.join(root, filename))

def input_dir ( self , dirname ) : dirname = dirname . rstrip ( '/' ) if self . excluded ( dirname ) : return 0 counters = self . options . report . counters verbose = self . options . verbose filepatterns = self . options . filename runner = self . runner for ( root , dirs , files ) in os . walk ( dirname ) : if verbose : print ( 'directory ' + root ) counters [ 'directories' ] += 1 for subdir in sorted ( dirs ) : if self . excluded ( os . path . join ( root , subdir ) ) : dirs . remove ( subdir ) for filename in sorted ( files ) : if ( pep8 . filename_match ( filename , filepatterns ) and ( not self . excluded ( filename ) ) ) : runner ( os . path . join ( root , filename ) )
check all python source files in this directory and all subdirectories .