Named
This module contains utilities for managing named objects.
DictOfNamed
module-attribute
DictOfNamed = Annotated[
DictAttr[str, T], BeforeValidator(enforce_name)
]
Dict
Bases: Dict
Source code in passengersim/config/named.py
__get_pydantic_core_schema__
classmethod
Source code in passengersim/config/named.py
DictAttr
Bases: dict
Source code in passengersim/config/named.py
__get_pydantic_core_schema__
classmethod
Source code in passengersim/config/named.py
__getattr__
ListOfNamed
Bases: list
Source code in passengersim/config/named.py
__delattr__
Source code in passengersim/config/named.py
__get_pydantic_core_schema__
classmethod
Source code in passengersim/config/named.py
__getattr__
Source code in passengersim/config/named.py
Named
Bases: PrettyModel
enforce_name
Enforce that each item has a unique name.
If you provide a list, this will ensure that each item in the list has a name. If you provide a dict, the names are given by the keys of the dictionary, and this will ensure that for each value, if it also has an explicitly defined name, that name matches its key-derived name.