quizcomp.cli.version

Get the version of the EduLinq Quiz Composer package.

usage: python3 -m quizcomp.cli.version [-h] [--version]

Get the version of the EduLinq Quiz Composer package.

options:
    -h, --help  show this help message and exit
    --version   show program's version number and exit
 1"""
 2Get the version of the EduLinq Quiz Composer package.
 3"""
 4
 5import argparse
 6import sys
 7
 8import quizcomp
 9import quizcomp.cli.parser
10
11def run_cli(args: argparse.Namespace) -> int:
12    """ Run the CLI. """
13
14    print(f"v{quizcomp.__version__}")
15    return 0
16
17def main() -> int:
18    """ Get a parser, parse the args, and call run. """
19
20    return run_cli(_get_parser().parse_args())
21
22def _get_parser() -> argparse.ArgumentParser:
23    """ Get the parser. """
24
25    return quizcomp.cli.parser.get_parser(__doc__.strip())
26
27if (__name__ == '__main__'):
28    sys.exit(main())
def run_cli(args: argparse.Namespace) -> int:
12def run_cli(args: argparse.Namespace) -> int:
13    """ Run the CLI. """
14
15    print(f"v{quizcomp.__version__}")
16    return 0

Run the CLI.

def main() -> int:
18def main() -> int:
19    """ Get a parser, parse the args, and call run. """
20
21    return run_cli(_get_parser().parse_args())

Get a parser, parse the args, and call run.