Sort key placing sections in a stable, reader-friendly order.
(title: str)
| 191 | |
| 192 | |
| 193 | def section_order(title: str) -> tuple[int, str]: |
| 194 | """Sort key placing sections in a stable, reader-friendly order.""" |
| 195 | if title == SECTION_REPO: |
| 196 | return (0, title) |
| 197 | if title == SECTION_GUIDES: |
| 198 | return (1, title) |
| 199 | if title == SECTION_BINARIES: |
| 200 | return (2, title) |
| 201 | if title.startswith(SECTION_CRATES): |
| 202 | return (3, title) |
| 203 | return (4, title) |
| 204 | |
| 205 | |
| 206 | def render_sections(entries: list[Entry]) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected