INNER CODE UNIT · Python

identify_imports_main

PyCQA/isort · isort/main.py:932

def identify_imports_main(
    argv: Sequence[str] | None = None, stdin: TextIOWrapper | None = None
) -> None:
    parser = argparse.ArgumentParser(
        description="Get all import definitions from a given file."
        "Use `-` as the first argument to represent stdin."
    )
    parser.add_argument(
        "files", nargs="+", help="One or more Python source files that need their imports sorted."
    )
    parser.add_argument(
        "--top-only",
        action="store_true",
        default=False,
        help="Only identify imports that occur in before functions or classes.",
    )

    target_group = parser.add_argument_group("target options")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…