(self, subject: str, description: str = "")
| 147 | self._path(task["id"]).write_text(json.dumps(task, indent=2)) |
| 148 | |
| 149 | def create(self, subject: str, description: str = "") -> str: |
| 150 | task = { |
| 151 | "id": self._next_id, |
| 152 | "subject": subject, |
| 153 | "description": description, |
| 154 | "status": "pending", |
| 155 | "owner": "", |
| 156 | "worktree": "", |
| 157 | "blockedBy": [], |
| 158 | "created_at": time.time(), |
| 159 | "updated_at": time.time(), |
| 160 | } |
| 161 | self._save(task) |
| 162 | self._next_id += 1 |
| 163 | return json.dumps(task, indent=2) |
| 164 | |
| 165 | def get(self, task_id: int) -> str: |
| 166 | return json.dumps(self._load(task_id), indent=2) |
no test coverage detected