mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-06 12:38:23 +00:00
CI runs `mypy .` over the whole tree; the refund test indexed `exc_info.value.detail` directly, but FastAPI's HTTPException inherits `detail: str` from Starlette, so mypy rejected the string key: tests/unit/test_stale_reservations.py:380: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index] Assert it is a dict first, which both narrows the type and pins the envelope shape the endpoint is now expected to return.