(self, task_id: int)
| 138 | return self.dir / f"task_{task_id}.json" |
| 139 | |
| 140 | def _load(self, task_id: int) -> dict: |
| 141 | path = self._path(task_id) |
| 142 | if not path.exists(): |
| 143 | raise ValueError(f"Task {task_id} not found") |
| 144 | return json.loads(path.read_text()) |
| 145 | |
| 146 | def _save(self, task: dict): |
| 147 | self._path(task["id"]).write_text(json.dumps(task, indent=2)) |
no test coverage detected