Command_Builder Module
- cli_command_parser.conversion.command_builder.convert_script(script: Script, add_methods: bool = False) str [source]
- class cli_command_parser.conversion.command_builder.Converter(ast_obj: AC | Script, parent: Converter | None = None)[source]
-
- classmethod __init_subclass__(converts: Type[AC] = None, newline_between_members: bool = None, **kwargs)[source]
- classmethod init_group(parent: CollectionConverter, ast_objs: list[AC]) ConverterGroup[C] [source]
- class cli_command_parser.conversion.command_builder.ConverterGroup(parent: CollectionConverter, member_type: Type[C], members: list[C])[source]
Bases:
Generic
[C
]- parent
- member_type
- members
- class cli_command_parser.conversion.command_builder.ScriptConverter(*args, add_methods: bool = False, **kwargs)[source]
Bases:
Converter
- class cli_command_parser.conversion.command_builder.CollectionConverter(ast_obj: AC | Script, parent: Converter | None = None)[source]
-
- ast_obj: ArgCollection
- parent: CollectionConverter | None
- property grouped_children: list[ConverterGroup[ParamConverter | GroupConverter | Converter]][source]
- descendant_args() Iterator[ParamConverter] [source]
- class cli_command_parser.conversion.command_builder.ParserConverter(parser: AstArgumentParser, parent: ParserConverter = None, counter: count = None, *, add_methods: bool = False)[source]
Bases:
CollectionConverter
[AstArgumentParser
]- ast_obj: AstArgumentParser
- parent: ParserConverter | None
- property sub_parser_converters: list[ParserConverter][source]
- descendant_args() Iterator[ParamConverter] [source]
- converts
alias of
AstArgumentParser
- class cli_command_parser.conversion.command_builder.GroupConverter(ast_obj: AC | Script, parent: Converter | None = None)[source]
Bases:
CollectionConverter
[ArgGroup
]
- class cli_command_parser.conversion.command_builder.ParamConverter(arg: ParserArg, parent: CollectionConverter, num: int)[source]
-
- parent: CollectionConverter | None
- classmethod init_group(parent: CollectionConverter, args: list[ParserArg]) ParamConverterGroup [source]
- class cli_command_parser.conversion.command_builder.ParamConverterGroup(parent: CollectionConverter, member_type: Type[C], members: list[C])[source]
Bases:
ConverterGroup
[ParamConverter
]
- class cli_command_parser.conversion.command_builder.BaseArgs(help: 'OptStr' = None)[source]
Bases:
object
- help: OptStr = None
- class cli_command_parser.conversion.command_builder.CommandArgs(help: 'OptStr' = None, choice: 'OptStr' = None, choices: 'OptStr' = None, prog: 'OptStr' = None, usage: 'OptStr' = None, description: 'OptStr' = None, epilog: 'OptStr' = None, option_name_mode: 'OptStr' = None, add_help: 'OptStr' = None, docs_url: 'OptStr' = None, email: 'OptStr' = None)[source]
Bases:
BaseArgs
- choice: OptStr = None
- choices: OptStr = None
- prog: OptStr = None
- usage: OptStr = None
- description: OptStr = None
- epilog: OptStr = None
- option_name_mode: OptStr = None
- add_help: OptStr = None
- docs_url: OptStr = None
- email: OptStr = None
- class cli_command_parser.conversion.command_builder.ParamBaseArgs(help: 'OptStr' = None, name: 'OptStr' = None, default: 'OptStr' = None, required: 'OptStr' = None, metavar: 'OptStr' = None, hide: 'OptStr' = None)[source]
Bases:
BaseArgs
- name: OptStr = None
- default: OptStr = None
- required: OptStr = None
- metavar: OptStr = None
- hide: OptStr = None
- class cli_command_parser.conversion.command_builder.PassThruArgs(help: 'OptStr' = None, name: 'OptStr' = None, default: 'OptStr' = None, required: 'OptStr' = None, metavar: 'OptStr' = None, hide: 'OptStr' = None)[source]
Bases:
ParamBaseArgs
- class cli_command_parser.conversion.command_builder.ParamArgs(help: 'OptStr' = None, name: 'OptStr' = None, default: 'OptStr' = None, required: 'OptStr' = None, metavar: 'OptStr' = None, hide: 'OptStr' = None, action: 'OptStr' = None, type: 'OptStr' = None, nargs: 'OptStr' = None, choices: 'OptStr' = None)[source]
Bases:
ParamBaseArgs
- action: OptStr = None
- type: OptStr = None
- nargs: OptStr = None
- choices: OptStr = None
- class cli_command_parser.conversion.command_builder.OptionArgs(help: 'OptStr' = None, name: 'OptStr' = None, default: 'OptStr' = None, required: 'OptStr' = None, metavar: 'OptStr' = None, hide: 'OptStr' = None, action: 'OptStr' = None, type: 'OptStr' = None, nargs: 'OptStr' = None, choices: 'OptStr' = None, name_mode: 'OptStr' = None)[source]
Bases:
ParamArgs
- name_mode: OptStr = None
- class cli_command_parser.conversion.command_builder.FlagArgs(help: 'OptStr' = None, name: 'OptStr' = None, default: 'OptStr' = None, required: 'OptStr' = None, metavar: 'OptStr' = None, hide: 'OptStr' = None, action: 'OptStr' = None, type: 'OptStr' = None, nargs: 'OptStr' = None, choices: 'OptStr' = None, name_mode: 'OptStr' = None, const: 'OptStr' = None)[source]
Bases:
OptionArgs
- const: OptStr = None