libstp.step.annotation¶
Attributes¶
Classes¶
Discovery metadata attached by |
Functions¶
|
Mark a class or function as part of the DSL. |
Module Contents¶
- class libstp.step.annotation.DslMeta¶
Discovery metadata attached by
@dslto steps and factories.
- libstp.step.annotation.T¶
- libstp.step.annotation.F¶
- libstp.step.annotation.dsl(_target: T) T¶
- libstp.step.annotation.dsl(_target: F) F
- libstp.step.annotation.dsl(_target: None = None, *, hidden: bool = False, name: str | None = None, tags: list[str] | tuple[str, Ellipsis] | None = None) Callable[[T | F], T | F]
Mark a class or function as part of the DSL.
- Usage:
@dsl class X(Step): …
@dsl(hidden=True, name=”TurnLeft”, tags=[“movement”, “rotation”]) class Y(Step): …
@dsl(name=”Wait”, tags=[“timing”]) def wait_seconds(seconds: float) -> WaitStep:
return WaitStep(seconds)
- Parameters:
hidden – If True, hide from auto-discovery/UI.
name – Custom display name (defaults to class/function name).
tags – List of tags for grouping in web UI.