Commands Module
Command usage / help text formatters
- author:
Doug Skrypa
- class cli_command_parser.formatting.commands.CommandHelpFormatter(command: CommandType, params: CommandParameters)
Bases:
object
- format_rst(fix_name: Bool = True, fix_name_func: NameFunc = None, init_level: int = 1, allow_sys_argv: Bool = False) str
Generate the RST content for the Command associated with this formatter and all of its subcommands
- format_usage(delim: str = ' ', sub_cmd_choice: str = None, allow_sys_argv: Bool = True, cont_indent: int = 4) str
- maybe_add_groups(groups: Iterable[ParamGroup])
- maybe_add_options(params: Iterable[BaseOption])
- maybe_add_positionals(params: Iterable[BasePositional])
- cli_command_parser.formatting.commands.get_formatter(command: CommandAny) CommandHelpFormatter
Get the
CommandHelpFormatter
for the given Command
- cli_command_parser.formatting.commands.get_usage_sub_cmds(command: CommandCls)