edq.cli.version

Get the version of the EduLinq Python utils package.

 1"""
 2Get the version of the EduLinq Python utils package.
 3"""
 4
 5import argparse
 6import sys
 7
 8import edq.core.argparser
 9import edq.core.version
10
11def run_cli(args: argparse.Namespace) -> int:
12    """ Run the CLI. """
13
14    print(f"v{edq.core.version.get_version()}")
15    return 0
16
17def main() -> int:
18    """ Get a parser, parse the args, and call run. """
19    return run_cli(_get_parser().parse_args())
20
21def _get_parser() -> edq.core.argparser.Parser:
22    """ Get the parser. """
23
24    return edq.core.argparser.get_default_parser(__doc__.strip())
25
26if (__name__ == '__main__'):
27    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{edq.core.version.get_version()}")
16    return 0

Run the CLI.

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

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