(chapter: dict[str, Any])
| 249 | |
| 250 | |
| 251 | def recompute_chapter_status(chapter: dict[str, Any]) -> str: |
| 252 | statuses = {s["status"] for s in chapter["sections"]} |
| 253 | if statuses == {"done"}: |
| 254 | return "done" |
| 255 | if "in_progress" in statuses or ("done" in statuses and "pending" in statuses): |
| 256 | return "in_progress" |
| 257 | return "pending" |
| 258 | |
| 259 | |
| 260 | def iter_sections(state: dict[str, Any]): |
no outgoing calls
no test coverage detected