INNER CODE UNIT · Python
get_argparser
Yelp/paasta · paasta_tools/cli/cli.py:137
def get_argparser(commands: list[str] | None = None) -> argparse.ArgumentParser:
"""Create and return argument parser for a set of subcommands.
:param commands: list[str] | None: If `commands` argument is `None`,
add full parsers for all subcommands, if `commands` is empty list -
add thin parsers for all subcommands, otherwise - add full parsers for
subcommands in the argument.
"""
parser = PrintsHelpOnErrorArgumentParser(
description=(
"The PaaSTA command line tool. The 'paasta' command is the entry point "
"to multiple subcommands, see below.\n\n"
"You can see more help for individual commands by appending them with '--help', "
"for example, 'paasta status --help' or see the man page with 'man paasta status'."
),
epilog=(
"The 'paasta' command line tool is designed to be used by humans, and therefore has "