Files
romm/backend/endpoints/roms
Sam Dornan 2dfcc51f4e fix(backend): type fastapi-pagination pages and params for mypy (#4713)
LimitOffsetPage.create is annotated to return LimitOffsetPage but builds
cls, so subclass pages failed return-value checks. A shared
TypedLimitOffsetPage narrows create() to Self, and resolve_params()
results are annotated with each page's params class.

CustomLimitOffsetPage.total keeps its intentional widening to None
(with_total=false) behind a narrow assignment ignore.

The OpenAPI schema is byte-identical before and after.


Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 16:27:48 -05:00
..