|
9 | 9 | import argparse |
10 | 10 | from pathlib import Path |
11 | 11 | import sys |
12 | | -from typing import TextIO, Iterable, Sequence, TypeAlias |
| 12 | +from typing import Literal, TextIO, Iterable, Sequence, TypeAlias |
13 | 13 |
|
14 | 14 |
|
15 | 15 | import rich |
|
25 | 25 |
|
26 | 26 | ParsedCommits: TypeAlias = Sequence[ |
27 | 27 | tuple[str, list[str], str, Iterable[mod_result.Result]] |
28 | | -] |
| 28 | +] # (commit_hash, flags, name, results) |
29 | 29 |
|
30 | 30 |
|
31 | 31 | def parse_commit(commit: str) -> tuple[str, str, list[str]]: |
@@ -143,7 +143,9 @@ def do_many_to_many( |
143 | 143 | fd.write("\n\nRows are 'bases', columns are 'heads'\n") |
144 | 144 |
|
145 | 145 |
|
146 | | -def _main_with_hashes(commits: Sequence[str], output_dir: Path, comparison_type: str): |
| 146 | +def _main_with_hashes( |
| 147 | + commits: Sequence[str], output_dir: Path, comparison_type: Literal["1:n", "n:n"] |
| 148 | +): |
147 | 149 | results = mod_result.load_all_results( |
148 | 150 | None, Path("results"), sorted=False, match=False |
149 | 151 | ) |
@@ -228,7 +230,9 @@ def _main_with_files(commits: Sequence[str], output_dir: Path, comparison_type: |
228 | 230 | rich.print() |
229 | 231 |
|
230 | 232 |
|
231 | | -def _main(commits: Sequence[str], output_dir: PathLike, comparison_type: str): |
| 233 | +def _main( |
| 234 | + commits: Sequence[str], output_dir: PathLike, comparison_type: Literal["1:n", "n:n"] |
| 235 | +): |
232 | 236 | if len(commits) < 2: |
233 | 237 | raise ValueError("Must provide at least 2 commits") |
234 | 238 |
|
|
0 commit comments