doot.control.runner._interface
Type Aliases
Protocols
Base class for protocol classes. |
|
Run tasks, actions, and jobs |
Module Contents
- doot.control.runner._interface.Handler: TypeAlias = bool | type[ContextManager] | ContextManager
- class doot.control.runner._interface.RunnerHandlers_p[source]
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto[T](Protocol): def meth(self) -> T: ...
- handle_success(
- task: RunnerHandlers_p.handle_success.T,
- Parameters:
task (RunnerHandlers_p.handle_success.T)
- Return type:
RunnerHandlers_p.handle_success.T
- sleep_after(
- task: jgdv.Maybe[doot.workflow._interface.Task_p | doot.workflow._interface.Artifact_i],
- Parameters:
task (jgdv.Maybe[doot.workflow._interface.Task_p | doot.workflow._interface.Artifact_i])
- Return type:
None
- class doot.control.runner._interface.WorkflowRunner_p(
- *,
- tracker: doot.control.tracker._interface.WorkflowTracker_p,
Bases:
ProtocolRun tasks, actions, and jobs
- Parameters: