Command_Parameters Module
The CommandParameters class in this module is used to process all of the attributes of a given Command
when
it is defined to collect its Parameter
/ ParamGroup
members. It also checks for conflicts between
parameter definitions.
It has some involvement in the parsing process for BaseOption
parameters.
- author:
Doug Skrypa
- class cli_command_parser.command_parameters.CommandParameters(command: CommandCls, command_parent: CommandCls | None, parent_params: CommandParameters | None, config: CommandConfig)[source]
Bases:
object
- sub_command: SubCommand | None = None
A SubCommand Parameter, if specified
- action_flags: ActionFlags
List of action flags
- options: list[BaseOption]
List of optional Parameters
- combo_option_map: OptionMap
Mapping of {short opt: Parameter} (no dash characters)
- groups: list[ParamGroup]
List of ParamGroup objects
- positionals: list[BasePositional]
List of positional Parameters
- option_map: OptionMap
Mapping of {–opt / -opt: Parameter}
- command: CommandCls
The Command associated with this CommandParameters object
- parent: CommandParameters | None
The parent Command’s CommandParameters
- property all_positionals: list[BasePositional][source]
- get_positionals_to_parse(ctx: Context) list[BasePositional] [source]
- property formatter: CommandHelpFormatter[source]
The formatter used for this Command’s help text