almanac.arguments

class ArgumentBase(param: inspect.Parameter, *, name: Optional[str] = None, description: Optional[str] = None, completers: Optional[Union[prompt_toolkit.completion.base.Completer, Iterable[prompt_toolkit.completion.base.Completer]]] = None, hidden: bool = False)[source]

Bases: abc.ABC

A class for encapsulating a command argument.

property annotation

The annotated type of this parameter.

abstract property completers

The registered completers for this argument.

property default_value
property description

A description of what this argument does.

property display_name

The name used to specify this argument from the interactive shell.

property has_default_value
property hidden

Whether this argument should be hidden in the interactive prompt.

property is_kw_only
property is_pos_only
property is_var_kw
property is_var_pos
property param

The internal inspect.Parameter wrapped by this class.

property real_name

The name of this argument within the actual command coroutine.

class FrozenArgument(param: inspect.Parameter, *, name: Optional[str] = None, description: Optional[str] = None, completers: Optional[Union[prompt_toolkit.completion.base.Completer, Iterable[prompt_toolkit.completion.base.Completer]]] = None, hidden: bool = False)[source]

Bases: almanac.arguments.argument_base.ArgumentBase

abbreviated_description

A shortened version of this arguments description.

property completers

The registered completers for this argument.

class MutableArgument(param: inspect.Parameter, *, name: Optional[str] = None, description: Optional[str] = None, completers: Optional[Union[prompt_toolkit.completion.base.Completer, Iterable[prompt_toolkit.completion.base.Completer]]] = None, hidden: bool = False)[source]

Bases: almanac.arguments.argument_base.ArgumentBase

property completers

The registered completers for this argument.

freeze()almanac.arguments.frozen_argument.FrozenArgument[source]