INNER CODE UNIT · Python

render_report

wilsonfreitas/awesome-quant · scripts/audit_readme.py:159

def render_report(findings: Iterable[Finding], *, checked_at: datetime) -> str:
    """Render findings as stable Markdown suitable for the tracking issue body."""
    ordered_findings = sorted(findings, key=_report_sort_key)
    checked_at_utc = checked_at.astimezone(timezone.utc)
    lines = [
        TRACKING_MARKER,
        f"# {TRACKING_TITLE}",
        "",
        f"Checked: {checked_at_utc:%Y-%m-%d %H:%M} UTC",
        "Entries are reported for manual review; this automation did not modify README.md.",
        "",
    ]
    if not ordered_findings:
        return "\n".join((*lines, "No findings.", ""))

    findings_by_kind: dict[FindingKind, list[Finding]] = {
        kind: [] for kind in FindingKind
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…