lms.cli.config.unset

Shallow frontend for edq.config.cmd.unset.

usage: python3 -m lms.cli.config.unset [-h] [--version]
                                       [--local | --project | --global | --file ]
                                       KEY [KEY ...]

Unset the first matching instance of a configuration option.

Does nothing if there is no matching config.

positional arguments:
    KEY            Configuration key to unset.

options:
    -h, --help     show this help message and exit
    --version      show program's version number and exit

config location options:
    --local        Target config option(s) in a local config file.
    --project      Target config option(s) in a project config file.
    --global       Target config option(s) in the global config file.
    --file   Target config option(s) in a specified config file.
 1"""
 2Shallow frontend for edq.config.cmd.unset.
 3"""
 4
 5import argparse
 6import sys
 7
 8import edq.config.cmd.unset
 9
10import lms.cli.parser
11
12def run_cli(args: argparse.Namespace) -> int:
13    """ Run the CLI. """
14
15    return edq.config.cmd.unset.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 additional flags. """
24
25    parser = lms.cli.parser.get_parser(edq.config.cmd.unset.__doc__.strip(),
26        include_server = False,
27        include_auth = False,
28    )
29    edq.config.cmd.unset.modify_parser(parser)
30
31    return parser
32
33if (__name__ == '__main__'):
34    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.unset.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.