Source code for pyqt_reactive.forms.parameter_value_contracts

"""Nominal contracts for dynamic form parameter payloads."""

from __future__ import annotations

from abc import ABC
from collections.abc import Callable


[docs] class ParameterValue(ABC): """Nominal annotation for values carried by parameter forms."""
[docs] class WidgetValue(ParameterValue): """Nominal annotation for values received from PyQt widgets."""
[docs] class FormObject(ABC): """Nominal annotation for objects analyzed by the form layer."""
[docs] class FormContext(ABC): """Nominal annotation for context objects used by placeholder resolution."""
[docs] class ParameterDefaultsByName(dict): """Map of parameter name to extracted/default value."""
[docs] class ParameterTypesByName(dict): """Map of parameter name to type annotation."""
[docs] class NestedManagerMap(dict): """Map of nested field name to nested form manager."""
[docs] class ParameterDescriptionByPath(dict): """Map of dotted parameter path to rendered description."""
[docs] class GeneratedServiceNamespace(dict): """Module namespace populated with generated initialization services."""
[docs] class ParameterInfoSequence(list): """Ordered parameter information sequence for widget build orchestration."""
ParameterDescriptionProvider = Callable[[], ParameterDescriptionByPath]