(self, state: dict[Any, Any])
| 296 | return state |
| 297 | |
| 298 | def __setstate__(self, state: dict[Any, Any]) -> None: |
| 299 | relations = { |
| 300 | k: v |
| 301 | for k, v in state["__dict__"].items() |
| 302 | if k in self.extract_related_names() |
| 303 | } |
| 304 | basic_state = { |
| 305 | k: v |
| 306 | for k, v in state["__dict__"].items() |
| 307 | if k not in self.extract_related_names() |
| 308 | } |
| 309 | state["__dict__"] = basic_state |
| 310 | super().__setstate__(state) |
| 311 | self._initialize_internal_attributes() |
| 312 | for name, value in relations.items(): |
| 313 | setattr(self, name, value) |
| 314 | |
| 315 | def _update_relation_cache(self, prev_hash: int, new_hash: int) -> None: |
| 316 | """ |
nothing calls this directly
no test coverage detected