Encode a repo-relative .gz path as a flat artifact-filename stem. `/` is replaced with `__` (no manpage filename in the corpus contains `__`, so the encoding stays reversible) and the `.gz` suffix is stripped.
(rel_path: str)
| 44 | |
| 45 | |
| 46 | def _path_stem(rel_path: str) -> str: |
| 47 | """Encode a repo-relative .gz path as a flat artifact-filename stem. |
| 48 | |
| 49 | `/` is replaced with `__` (no manpage filename in the corpus contains |
| 50 | `__`, so the encoding stays reversible) and the `.gz` suffix is stripped. |
| 51 | """ |
| 52 | if rel_path.endswith(".gz"): |
| 53 | rel_path = rel_path[:-3] |
| 54 | return rel_path.replace("/", "__") |
| 55 | |
| 56 | |
| 57 | def _read_corpus(corpus_path: Path) -> list[Path]: |
no outgoing calls
no test coverage detected