(self, task: dict)
| 273 | return json.loads(p.read_text()) |
| 274 | |
| 275 | def _save(self, task: dict): |
| 276 | (TASKS_DIR / f"task_{task['id']}.json").write_text(json.dumps(task, indent=2)) |
| 277 | |
| 278 | def create(self, subject: str, description: str = "") -> str: |
| 279 | task = {"id": self._next_id(), "subject": subject, "description": description, |