def normalize_whitespace(file_paths): """Make sure that the whitespace for .py files have been normalized.""" reindent.makebackup = False # No need to create backups. fixed = [] for path in (x for x in file_paths if x.endswith('.py')): if reindent.check(os.path.join(SRCDIR, path)): fixed.append(path) return fixed
def normalize_whitespace(file_paths): """Make sure that the whitespace for .py files have been normalized.""" reindent.makebackup = False # No need to create backups. fixed = [] for path in (x for x in file_paths if x.endswith('.py')): if reindent.check(path): fixed.append(path) return fixed
def normalize_whitespace(file_paths): """Make sure that the whitespace for .py files have been normalized.""" reindent.makebackup = False # No need to create backups. fixed = [ path for path in file_paths if path.endswith('.py') and reindent.check(os.path.join(SRCDIR, path)) ] return fixed
def normalize_whitespace(file_paths): """Make sure that the whitespace for .py files have been normalized.""" reindent.makebackup = False # No need to create backups. fixed = [path for path in file_paths if path.endswith('.py') and reindent.check(os.path.join(SRCDIR, path))] return fixed
def formatpyfiles(filelist): "Indent filenames in filelist." for filename in filelist: reindent.check(filename)