parameters: (self, items, write=False, doctests_only=False)
docstring: Refactor a list of files and directories.
docstring_summary: Refactor a list of files and directories.
docstring_tokens: Refactor a list of files and directories .
function: def refactor(self, items, write=False, doctests_only=False):
          """Refactor a list of files and directories."""
  
          for dir_or_file in items:
              if os.path.isdir(dir_or_file):
                  self.refactor_dir(dir_or_file, write, doctests_only)
              else:
                  self.refactor_file(dir_or_file, write, doctests_only)
function_tokens: def refactor ( self , items , write = False , doctests_only = False ) : for dir_or_file in items : if os . path . isdir ( dir_or_file ) : self . refactor_dir ( dir_or_file , write , doctests_only ) else : self . refactor_file ( dir_or_file , write , doctests_only )