initialization
initialization
#
Construction and subclassing hooks bound onto Procedure.
__post_init__ runs after every node's dataclass __init__ in one fixed
order: stamp identity, resolve the return type, validate the node, register it
with the active recording context. A node customizes only the middle step, by
overriding _resolve_type — never by choosing where to call super().
__init_subclass__ records each subclass's declared return type.
__init_subclass__(cls)
#
Record the subclass's return type from its Procedure[X] base.
Source code in capturegraph-lib/capturegraph/procedures/procedure/methods/initialization.py
__post_init__(self)
#
Stamp identity, resolve the type, type-check the node, and register it.
Constructing a node registers it with the active recording context (which
is how a procedure body is built — see
capturegraph.procedures.procedure.authoring.contexts). There must be one: a node
built with no active context raises, unless under cg.detached().