(
base_dir: Path, current_dir: Path
)
| 421 | |
| 422 | |
| 423 | def _comparison_data( |
| 424 | base_dir: Path, current_dir: Path |
| 425 | ) -> tuple[dict[str, Any], dict[str, Any], list[str], dict[str, list[str]]]: |
| 426 | baseline = _load_summary(base_dir) |
| 427 | current = _load_summary(current_dir) |
| 428 | base_pages = _page_map(baseline) |
| 429 | current_pages = _page_map(current) |
| 430 | paths = sorted(set(base_pages) | set(current_pages)) |
| 431 | suspicious: dict[str, list[str]] = {} |
| 432 | for path in paths: |
| 433 | reasons = _suspicious_changes( |
| 434 | path, base_pages.get(path), current_pages.get(path) |
| 435 | ) |
| 436 | if reasons: |
| 437 | suspicious[path] = reasons |
| 438 | return baseline, current, paths, suspicious |
| 439 | |
| 440 | |
| 441 | def compare_runs(args: argparse.Namespace) -> int: |
no test coverage detected