(report: Path)
| 64 | |
| 65 | |
| 66 | def load_alerts(report: Path) -> list[dict[str, object]]: |
| 67 | if not report.is_file(): |
| 68 | return [] |
| 69 | try: |
| 70 | data = json.loads(report.read_text(encoding="utf-8")) |
| 71 | except json.JSONDecodeError: |
| 72 | return [] |
| 73 | |
| 74 | return _collect_alerts(data) |
| 75 | |
| 76 | |
| 77 | def render_alert_rows(alerts: Iterable[dict[str, object]]) -> str: |
no test coverage detected