INNER CODE UNIT · Python

parse_cli_args

phillipdupuis/pydantic-to-typescript · pydantic2ts/cli/script.py:360

def parse_cli_args(args: Optional[List[str]] = None) -> argparse.Namespace:
    """
    Parses the command-line arguments passed to pydantic2ts.
    """
    parser = argparse.ArgumentParser(
        prog="pydantic2ts",
        description=main.__doc__,
        formatter_class=argparse.RawTextHelpFormatter,
    )
    parser.add_argument(
        "--module",
        help="name or filepath of the python module.\n"
        "Discoverable submodules will also be checked.",
        required=True,
    )
    parser.add_argument(
        "--output",
        help="name of the file the typescript definitions should be written to.",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…