in nubia/internal/plugin_interface.py [0:0]
def get_opts_parser(self, add_help=True):
"""
Builds the ArgumentParser that will be passed to nubia, use this to
build your list of arguments that you want for your shell.
"""
epilog = (
"NOTES: LIST types are given as comma separated values, "
"eg. a,b,c,d. DICT types are given as semicolon separated "
"key:value pairs (or key=value), e.g., a:b;c:d and if a dict "
"takes a list as value it look like a:1,2;b:1"
)
opts_parser = argparse.ArgumentParser(
description="A Generic Shell Utility",
epilog=epilog,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
add_help=add_help,
)
opts_parser.add_argument(
"--verbose",
"-v",
action="count",
default=0,
help="Increase verbosity, can be specified multiple times",
)
opts_parser.add_argument(
"--stderr",
"-s",
action="store_true",
help="By default the logging output goes to a "
"temporary file. This disables this feature "
"by sending the logging output to stderr",
)
opts_parser.add_argument(
"--command-timeout",
required=False,
type=int,
default=DEFAULT_COMMAND_TIMEOUT,
help="Timeout for commands (default %ds)" % DEFAULT_COMMAND_TIMEOUT,
)
return opts_parser