Skip to content

pawamoy_testing ¤

Pawamoy Testing package.

Testing this great template

Functions:

  • get_parser

    Return the CLI argument parser.

  • main

    Run the main program.

get_parser ¤

get_parser() -> ArgumentParser

Return the CLI argument parser.

Returns:

Source code in src/pawamoy_testing/_internal/cli.py
30
31
32
33
34
35
36
37
38
39
def get_parser() -> argparse.ArgumentParser:
    """Return the CLI argument parser.

    Returns:
        An argparse parser.
    """
    parser = argparse.ArgumentParser(prog="pawamoy-testing")
    parser.add_argument("-V", "--version", action="version", version=f"%(prog)s {debug._get_version()}")
    parser.add_argument("--debug-info", action=_DebugInfo, help="Print debug information.")
    return parser

main ¤

main(args: list[str] | None = None) -> int

Run the main program.

This function is executed when you type pawamoy-testing or python -m pawamoy_testing.

Parameters:

  • args ¤

    (list[str] | None, default: None ) –

    Arguments passed from the command line.

Returns:

  • int

    An exit code.

Source code in src/pawamoy_testing/_internal/cli.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
def main(args: list[str] | None = None) -> int:
    """Run the main program.

    This function is executed when you type `pawamoy-testing` or `python -m pawamoy_testing`.

    Parameters:
        args: Arguments passed from the command line.

    Returns:
        An exit code.
    """
    parser = get_parser()
    opts = parser.parse_args(args=args)
    print(opts)
    return 0