doot.cmds._base

Type Aliases

ListVal

Classes

BaseCommand

Generic implementations of command methods

Module Contents

doot.cmds._base.ListVal: TypeAlias = Maybe[str | Lambda | tuple[str, dict]]
class doot.cmds._base.BaseCommand(name: jgdv.Maybe[str] = None)[source]

Generic implementations of command methods

Parameters:

name (jgdv.Maybe[str])

build_param: collections.abc.Callable
_help: ClassVar[tuple[str, Ellipsis]]
_name = None
property name: str[source]

get command name as used from command line

Return type:

str

property help: list[str][source]
Return type:

list[str]

property helpline: str[source]

get just the first line of the help text

Return type:

str

param_specs() list[jgdv.cli.ParamSpec_p][source]

Provide parameter specs for parsing into doot.args.cmds

Return type:

list[jgdv.cli.ParamSpec_p]

_print_text(
text: collections.abc.Iterable[ListVal],
) None[source]

Utility method to print text out at the user level

Parameters:

text (collections.abc.Iterable[ListVal])

Return type:

None

shutdown(
tasks: jgdv.structs.chainguard.ChainGuard,
plugins: jgdv.structs.chainguard.ChainGuard,
errored: jgdv.Maybe[doot.errors.DootError] = None,
) None[source]
Parameters:
  • tasks (jgdv.structs.chainguard.ChainGuard)

  • plugins (jgdv.structs.chainguard.ChainGuard)

  • errored (jgdv.Maybe[doot.errors.DootError])

Return type:

None