Remove completed_id from all other tasks' blockedBy lists.
(self, completed_id: int)
| 93 | return json.dumps(task, indent=2, ensure_ascii=False) |
| 94 | |
| 95 | def _clear_dependency(self, completed_id: int): |
| 96 | """Remove completed_id from all other tasks' blockedBy lists.""" |
| 97 | for f in self.dir.glob("task_*.json"): |
| 98 | task = json.loads(f.read_text()) |
| 99 | if completed_id in task.get("blockedBy", []): |
| 100 | task["blockedBy"].remove(completed_id) |
| 101 | self._save(task) |
| 102 | |
| 103 | def list_all(self) -> str: |
| 104 | tasks = [] |