INNER CODE UNIT · Python
SpecializedContextDataImplementation
volfpeter/htmy · htmy/core.py:94
class SpecializedContextDataImplementation(ContextDataImplementation):
# Instances of this class will be registered under `ContextDataDefinition` (the
# "base context type") and also under this type, but they will not be registered
# under `ContextDataImplementation`, since that's not the base context type.
...
```
"""
__slots__ = ()
_base_context_type: ClassVar[type[ContextAware] | None] = None
def __init_subclass__(cls) -> None:
if cls.mro()[1] == ContextAware:
cls._base_context_type = cls
def in_context(self, *children: ComponentType) -> WithContext:
"""