def main(): # Parse Command line options parser = option_parser() (o, args) = parser.parse_args() # Test for needed binaries. Exit if missing. needed_binaries = [ "git", "autopylint", ] test_for_required_binaries(needed_binaries) # Do the business method_fn = METHOD_TABLE.get(o.method) if method_fn: for arg in (args or ["."]): method_fn( arg, ext=o.extensions, recurse=o.recurse, dryrun=o.dryrun, verbose=o.verbose, author=o.author ) else: fmt = "'{0}' is not a valid value for --method. Valid ones are: {1}" keys = sorted(METHOD_TABLE.keys()) error(fmt.format(o.method, ", ".join(keys)))
def main(): # Parse Command line options parser = option_parser() (o, args) = parser.parse_args() # Test for needed binaries. Exit if missing. needed_binaries = ["git", o.autopep8, "pep8"] test_for_required_binaries(needed_binaries) errors = make_error_list(o.errors, ERRORS) # Do the business method_fn = METHOD_TABLE.get(o.method) if method_fn: repo = git.Repo(".") for arg in (args or ["."]): method_fn(repo, arg, recurse=o.recurse, dryrun=o.dryrun, verbose=o.verbose, autopep8=o.autopep8, errors=errors) else: fmt = "'{0}' is not a valid value for --method. Valid ones are: {1}" keys = sorted(METHOD_TABLE.keys()) error(fmt.format(o.method, ", ".join(keys)))
def main(): # Parse Command line options parser = option_parser() (o, args) = parser.parse_args() # Test for needed binaries. Exit if missing. needed_binaries = [ "git", o.autopep8, "pep8" ] test_for_required_binaries(needed_binaries) errors = make_error_list(o.errors, ERRORS) # Do the business method_fn = METHOD_TABLE.get(o.method) if method_fn: repo = git.Repo(".") for arg in (args or ["."]): method_fn( repo, arg, recurse=o.recurse, dryrun=o.dryrun, verbose=o.verbose, autopep8=o.autopep8, errors=errors ) else: fmt = "'{0}' is not a valid value for --method. Valid ones are: {1}" keys = sorted(METHOD_TABLE.keys()) error(fmt.format(o.method, ", ".join(keys)))