Listen for objects loaded or refreshed. Wrap the target data member's value with ``Mutable``.
(state: InstanceState[_O], *args: Any)
| 512 | listen_keys = cls._get_listen_keys(attribute) |
| 513 | |
| 514 | def load(state: InstanceState[_O], *args: Any) -> None: |
| 515 | class="st">"""Listen for objects loaded or refreshed. |
| 516 | |
| 517 | Wrap the target data member&class="cm">#x27;s value with |
| 518 | ``Mutable``. |
| 519 | |
| 520 | class="st">""" |
| 521 | val = state.dict.get(key, None) |
| 522 | if val is not None: |
| 523 | if coerce: |
| 524 | val = cls.coerce(key, val) |
| 525 | assert val is not None |
| 526 | state.dict[key] = val |
| 527 | val._parents[state] = key |
| 528 | |
| 529 | def load_attrs( |
| 530 | state: InstanceState[_O], |
no test coverage detected