chore: annotate the aggregate row so mypy passes

`fetchone` without a model leaves its TModel unbound, so the COUNT(*) row
needs an explicit type. Completes the black + ruff + mypy pipeline the
Makefile declares.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018jy52j9GRZ6XKa1Zt21LLj
This commit is contained in:
Padreug 2026-08-31 13:56:45 +02:00
commit 8a10c3cacc

View file

@ -148,7 +148,9 @@ async def count_period_failures(contract_id: str, period_index: int) -> int:
counter on the contract so the number survives a restart and stays
auditable — the rows that produced it are right there.
"""
row = await db.fetchone(
# No model: fetchone's TModel is unbound for a bare aggregate, so the
# row comes back as a plain mapping and needs its own annotation.
row: dict | None = await db.fetchone(
"SELECT COUNT(*) AS n FROM payroll.payouts "
"WHERE contract_id = :cid AND period_index = :idx AND status = :status",
{