ParentLookup¶
- class parent_lookup.lookup.ParentLookup(parent_type: type[TParent])¶
Bases:
Generic[TParent]Descriptor that resolves a parent instance for a child object.
The descriptor is intended for declaration on child classes to avoid repeating explicit
find_parentmethods. It delegates lookup resolution tolookup_registryand returnsNonewhen no parent is found.- __init__(parent_type: type[TParent]) None¶
Methods
__init__(parent_type)