(self)
| 181 | return data |
| 182 | |
| 183 | def _persist(self) -> None: |
| 184 | if not self._persist_path: |
| 185 | return |
| 186 | self._persist_path.parent.mkdir(parents=True, exist_ok=True) |
| 187 | tmp = self._persist_path.with_suffix(".tmp") |
| 188 | tmp.write_text(json.dumps(self.to_dict(), indent=2, default=str)) |
| 189 | tmp.rename(self._persist_path) |
| 190 | |
| 191 | def _load(self) -> None: |
| 192 | data = json.loads(self._persist_path.read_text()) |
no test coverage detected