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 20 return run_cli(_get_parser().parse_args()) 21 22def _get_parser() -> argparse.ArgumentParser: 23 """ Get the parser. """ 24 25 return edq.core.argparser.get_default_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{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 21 return run_cli(_get_parser().parse_args())
Get a parser, parse the args, and call run.