doot.cmds.stub_cmd

Type Aliases

ListVal

Classes

_StubDoot_m

Mixin for stubbing the doot.toml file

_StubParam_m

Mixin for stubbing a cli parameter

_StubAction_m

Mixin for stubbing an action

_StubTask_m

Mixin for stubbing a task

_StubPrinter_m

Mixin for stubbing printer config

StubCmd

Called to interactively create a stub task definition

Module Contents

doot.cmds.stub_cmd.ListVal: TypeAlias = str | Lambda | tuple[str, dict]
class doot.cmds.stub_cmd._StubDoot_m[source]

Mixin for stubbing the doot.toml file

param_specs() list[source]
Return type:

list

_stub_doot_toml() list[str][source]
Return type:

list[str]

class doot.cmds.stub_cmd._StubParam_m[source]

Mixin for stubbing a cli parameter

param_specs() list[source]
Return type:

list

_stub_cli_param() list[str][source]
Return type:

list[str]

class doot.cmds.stub_cmd._StubAction_m[source]

Mixin for stubbing an action

param_specs() list[source]
Return type:

list

_stub_action(
idx: int,
plugins: jgdv.structs.chainguard.ChainGuard,
) list[jgdv.Maybe[str]][source]
Parameters:
  • idx (int)

  • plugins (jgdv.structs.chainguard.ChainGuard)

Return type:

list[jgdv.Maybe[str]]

class doot.cmds.stub_cmd._StubTask_m[source]

Mixin for stubbing a task

param_specs() list[source]
Return type:

list

_stub_task_toml(
idx: int,
tasks: jgdv.structs.chainguard.ChainGuard,
plugins: jgdv.structs.chainguard.ChainGuard,
) list[str][source]

This creates a toml stub using default values, as best it can

Parameters:
  • idx (int)

  • tasks (jgdv.structs.chainguard.ChainGuard)

  • plugins (jgdv.structs.chainguard.ChainGuard)

Return type:

list[str]

_stub_task_name(
idx: int,
tasks: jgdv.structs.chainguard.ChainGuard,
) str[source]
Parameters:
  • idx (int)

  • tasks (jgdv.structs.chainguard.ChainGuard)

Return type:

str

_add_ctor_specific_stub_fields(
idx: int,
stub: doot.cmds.structs.TaskStub,
) None[source]

add ctor specific fields, such as for dir_walker: roots [], exts [], recursive bool, subtask “”, head_task “” works towards the task_type, not away, so more specific elements are added over the top of more general elements

Parameters:
  • idx (int)

  • stub (doot.cmds.structs.TaskStub)

Return type:

None

class doot.cmds.stub_cmd._StubPrinter_m[source]

Mixin for stubbing printer config

param_specs() list[source]
Return type:

list

_stub_printer() list[jgdv.Maybe[str | tuple]][source]
Return type:

list[jgdv.Maybe[str | tuple]]

class doot.cmds.stub_cmd.StubCmd(name: jgdv.Maybe[str] = None)[source]

Bases: doot.cmds._base.BaseCommand

Called to interactively create a stub task definition with a target, outputs to that file, else to stdout for piping

Parameters:

name (jgdv.Maybe[str])

_name = 'stub'
_help = ('Create a new stub task either to stdout, or path', 'args allow stubbing a config file, cli...
param_specs() list[source]

Provide parameter specs for parsing into doot.args.cmds

Return type:

list