fix: type the lists and returns mypy flagged

The data tree record carries the needed flag since 072380c26, and
the manifest test still built the three-part one. profile_sync's triage
lists and _emit's returns, site_insights' GoatCounter answers and
make_demo's blocks are annotated, and the baseline loses the entry
that no longer occurs.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 22:30:55 +01:00
1 parent 5730380d12
commit ae7feba539
5 files changed
+13 -9

No files matched your search

+6 -5
View File
@@ -5018,7 +5018,7 @@ def _print_triage(
) -> bool:
"""Profiles ranked by drift, worst first. False when Ctrl-C cut the
scoring short: the ranking then covers the profiles scored."""
ranked = []
ranked: list[tuple[int, ProfileReport, str]] = []
sampled = 0
progress = _Progress(len(reports), "scored", args.offline or len(reports) < 2)
complete = True
@@ -5299,7 +5299,7 @@ def main() -> None:
raise SystemExit(1)
return
reports = []
reports: list[ProfileReport] = []
quiet = args.offline or len(selected) < 2
if not quiet:
print(
@@ -5474,18 +5474,18 @@ def _emit(
triage was cut short."""
if args.as_json:
print(json.dumps([report_to_dict(r) for r in shown], indent=2))
return
return None
if args.markdown:
target = Path(args.report_dir) / f"profile-sync-{date.today().isoformat()}.md"
target.parent.mkdir(parents=True, exist_ok=True)
target.write_text(format_markdown(shown), encoding="utf-8")
print(f"written: {target}")
return
return None
if args.fetch_plan:
for report in shown:
for url in fetch_plan(report):
print(url)
return
return None
if args.triage:
return _print_triage(args, selected, shown)
for report in shown:
@@ -5494,6 +5494,7 @@ def _emit(
print()
if args.changed_only:
_print_elided(reports, len(shown), frozenset(report.name for report in shown))
return None
def _print_elided(