Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
default_fields = os.environ.get("JOHNNYDEP_FIELDS", "name,summary").split(",")
parser = ArgumentParser(description=johnnydep.__doc__)
parser.add_argument("req", help="The project name or requirement specifier")
parser.add_argument("--index-url", "-i")
parser.add_argument("--extra-index-url")
parser.add_argument(
"--output-format",
"-o",
choices=["human", "json", "yaml", "python", "toml", "pinned"],
default="human",
)
parser.add_argument(
"--no-deps", help="Don't recurse the dependency tree", dest="recurse", action="store_false"
)
parser.add_argument(
"--fields", "-f", nargs="*", default=default_fields, choices=list(FIELDS) + ["ALL"]
)
parser.add_argument("--for-python", "-p", dest="env", type=python_interpreter)