(reasons: list[str])
| 635 | |
| 636 | |
| 637 | def _compact_reasons(reasons: list[str]) -> list[str]: |
| 638 | cats = sorted({r.split(":", 1)[1] for r in reasons if r.startswith("category:")}) |
| 639 | other = [r for r in reasons if not r.startswith("category:")] |
| 640 | out = [] |
| 641 | if cats: |
| 642 | out.append("categories: " + ", ".join(cats)) |
| 643 | out.extend(other) |
| 644 | return out |
| 645 | |
| 646 | |
| 647 | def _details_open(summary: str, add_blank: bool = True) -> str: |
no test coverage detected