command_creator.CmdArgument
- class command_creator.CmdArgument(help: str = '', abrv: str | None = None, choices: list[~typing.Any] | type[~enum.Enum] | None = None, metavar: str | None = None, optional: bool = False, positional: bool = False, default: ~typing.Any = <dataclasses._MISSING_TYPE object>, default_factory: ~typing.Callable[[], ~typing.Any] = <function CmdArgument.<lambda>>, init: bool = True, repr: bool = True, hash: bool | None = None, compare: bool = True, count: bool = False, completer: ~typing.Callable[[~typing.Unpack[~command_creator.CompleterArgs]], ~typing.List[str] | ~typing.Dict[str, str]] | ~typing.Dict[str, str] | ~typing.List[str] | None = None, metadata: ~typing.Mapping[~typing.Any, ~typing.Any] = {}, **kwargs: ~typing.Any)
Bases:
FieldClass which represents a command-line argument
- __init__(help: str = '', abrv: str | None = None, choices: list[~typing.Any] | type[~enum.Enum] | None = None, metavar: str | None = None, optional: bool = False, positional: bool = False, default: ~typing.Any = <dataclasses._MISSING_TYPE object>, default_factory: ~typing.Callable[[], ~typing.Any] = <function CmdArgument.<lambda>>, init: bool = True, repr: bool = True, hash: bool | None = None, compare: bool = True, count: bool = False, completer: ~typing.Callable[[~typing.Unpack[~command_creator.CompleterArgs]], ~typing.List[str] | ~typing.Dict[str, str]] | ~typing.Dict[str, str] | ~typing.List[str] | None = None, metadata: ~typing.Mapping[~typing.Any, ~typing.Any] = {}, **kwargs: ~typing.Any) None
Methods
__init__([help, abrv, choices, metavar, ...])get_default()Attributes
The help string used for the argument
The abbreviation for the argument, if any
The choices for the argument, if any
Whether the argument is optional
Whether the argument is positional
Whether the argument is a count
The argcomplete completer for the argument, if any
The metavar for the argument, if any
comparedefaultdefault_factoryhashinitkw_onlymetadatanamereprtype- abrv
The abbreviation for the argument, if any
- choices
The choices for the argument, if any
- completer
The argcomplete completer for the argument, if any
- count
Whether the argument is a count
- help
The help string used for the argument
- metavar
The metavar for the argument, if any
- optional
Whether the argument is optional
- positional
Whether the argument is positional