code: def main(self, *directories):
          
          if not self.git and len(directories) == 0:
              print ("ERROR: At least one directory must be provided (or the "
                     "--git-precommit flag must be passed.\n")
              self.help()
              return
  
          if len(directories) > 0:
              find = local['find']
              files = []
              for directory in directories:
                  real = os.path.expanduser(directory)
                  if not os.path.exists(real):
                      raise ValueError("{0} does not exist".format(directory))
                  files.extend(find(real, '-name', '*.py').strip().split('\n'))
              if len(files) > 0:
                  print "Linting {0} python files.\n".format(len(files))
                  lint(files)
              else:
                  print "No python files found to lint.\n"
  
          else:
              status = local['git']('status', '--porcelain', '-uno')
              root = local['git']('rev-parse', '--show-toplevel').strip()
  
              # get all modified or added python files
              modified = re.findall(r"^[AM]\s+\S+\.py$", status, re.MULTILINE)
  
              # now just get the path part, which all should be relative to the
              # root
              files = [os.path.join(root, line.split(' ', 1)[-1].strip())
                       for line in modified]
              if len(files) > 0:
                  lint(files)
docs: The actual logic that runs the linters