autograder .cli .config .list
Shallow frontend for edq.config.cmd.list.
usage: python3 -m autograder.cli.config.list [-h] [--version] [--testing-mode]
[--include-cli] [--show-origin]
[--skip-header]
List the current configuration options.
options:
-h, --help show this help message and exit
--version show program's version number and exit
testing options:
--testing-mode Run as if a test is being run (default: False).
list options:
--include-cli Include implicit CLI config values (values defined
directly on the CLI but not with `--config`).
--show-origin Display where each configuration's value was obtained
from.
--skip-header Skip headers when displaying configs.
1""" 2Shallow frontend for edq.config.cmd.list. 3""" 4 5import argparse 6import sys 7 8import edq.config.cmd.list 9 10import autograder.cli.parser 11 12def run_cli(args: argparse.Namespace) -> int: 13 """ Run the CLI. """ 14 15 return edq.config.cmd.list.run(args) 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 a parser and add addition flags. """ 24 25 parser = autograder.cli.parser.get_parser(edq.config.cmd.list.__doc__.strip(), 26 include_net = False, 27 ) 28 edq.config.cmd.list.modify_parser(parser) 29 30 return parser 31 32if (__name__ == '__main__'): 33 sys.exit(main())
def
run_cli(args: argparse.Namespace) -> int:
13def run_cli(args: argparse.Namespace) -> int: 14 """ Run the CLI. """ 15 16 return edq.config.cmd.list.run(args)
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.