(
self,
state: InstanceState[Any],
dict_: Dict[str, Any],
passive: PassiveFlag = PASSIVE_OFF,
)
| 1268 | raise AttributeError("%s object does not have a value" % self) |
| 1269 | |
| 1270 | def get_history( |
| 1271 | self, |
| 1272 | state: InstanceState[Any], |
| 1273 | dict_: Dict[str, Any], |
| 1274 | passive: PassiveFlag = PASSIVE_OFF, |
| 1275 | ) -> History: |
| 1276 | if self.key in dict_: |
| 1277 | return History.from_scalar_attribute(self, state, dict_[self.key]) |
| 1278 | elif self.key in state.committed_state: |
| 1279 | return History.from_scalar_attribute(self, state, NO_VALUE) |
| 1280 | else: |
| 1281 | if passive & INIT_OK: |
| 1282 | passive ^= INIT_OK |
| 1283 | current = self.get(state, dict_, passive=passive) |
| 1284 | if current is PASSIVE_NO_RESULT: |
| 1285 | return HISTORY_BLANK |
| 1286 | else: |
| 1287 | return History.from_scalar_attribute(self, state, current) |
| 1288 | |
| 1289 | def set( |
| 1290 | self, |
nothing calls this directly
no test coverage detected