bridge.pipelines.protocols.none_propagation module#
SafeAttr proxy class for safe attribute/item access and deep unwrapping utility.
- class bridge.pipelines.protocols.none_propagation.SafeAttr(v)[source]#
Bases:
objectA proxy class that safely accesses attributes and items of an underlying object. If an attribute or item does not exist, it returns a SafeAttr wrapping None instead of raising an exception.
- bridge.pipelines.protocols.none_propagation.deep_unwrap(v, *, _seen=None)[source]#
Recursively unwrap SafeAttr instances within common container types.
- Parameters:
v (Any) – The value to unwrap.
_seen (set | None) – Internal set to track seen object IDs for cycle detection.
- Returns:
The deeply unwrapped value.
- Return type:
Any