Bases: DescriptorRegistry
A DescriptorRegistry for actions of a Thing class or Thing instance.
UML Diagram
Source code in repo/hololinked/hololinked/core/meta.py
| class ActionsRegistry(DescriptorRegistry):
"""
A `DescriptorRegistry` for actions of a `Thing` class or `Thing` instance.
[UML Diagram](https://docs.hololinked.dev/UML/PDF/DescriptorRegistry.pdf)
"""
@property
def descriptor_object(self) -> type[Action]:
"""The type of descriptor object that this registry holds, i.e. `Action`."""
return Action
descriptors = property(DescriptorRegistry.get_descriptors) # type: dict[str, Action]
values = property(DescriptorRegistry.get_values, doc=DescriptorRegistry.get_values.__doc__) # type: dict[str, Action]
def __getitem__(self, key: str) -> Action | BoundAction:
if self.owner_inst is not None:
return self.descriptors[key].__get__(self.owner_inst, self.owner_cls)
return self.descriptors[key]
def __contains__(self, obj: object) -> bool:
return obj in self.descriptors.values() or obj in self.descriptors
|
descriptor_object() -> type[Action]
The type of descriptor object that this registry holds, i.e. Action.
Source code in repo/hololinked/hololinked/core/meta.py
| @property
def descriptor_object(self) -> type[Action]:
"""The type of descriptor object that this registry holds, i.e. `Action`."""
return Action
|