(
self,
state: InstanceState[Any],
dict_: Dict[str, Any],
value: Any,
initiator: Optional[AttributeEventToken] = None,
passive: PassiveFlag = PASSIVE_OFF,
check_old: Optional[object] = None,
pop: bool = False,
)
| 1269 | return History.from_scalar_attribute(self, state, current) |
| 1270 | |
| 1271 | def set( |
| 1272 | self, |
| 1273 | state: InstanceState[Any], |
| 1274 | dict_: Dict[str, Any], |
| 1275 | value: Any, |
| 1276 | initiator: Optional[AttributeEventToken] = None, |
| 1277 | passive: PassiveFlag = PASSIVE_OFF, |
| 1278 | check_old: Optional[object] = None, |
| 1279 | pop: bool = False, |
| 1280 | ) -> None: |
| 1281 | if self.dispatch._active_history: |
| 1282 | old = self.get(state, dict_, PASSIVE_RETURN_NO_VALUE) |
| 1283 | else: |
| 1284 | old = dict_.get(self.key, NO_VALUE) |
| 1285 | |
| 1286 | if self.dispatch.set: |
| 1287 | value = self.fire_replace_event( |
| 1288 | state, dict_, value, old, initiator |
| 1289 | ) |
| 1290 | state._modified_event(dict_, self, old) |
| 1291 | dict_[self.key] = value |
| 1292 | |
| 1293 | def fire_replace_event( |
| 1294 | self, |
nothing calls this directly
no test coverage detected