chore(types): tighten E40 review collections
This commit is contained in:
@@ -6,7 +6,7 @@ import re
|
||||
from collections.abc import Callable
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from typing import Annotated, Any, Final, Literal
|
||||
from typing import Annotated, Any, Final, Literal, cast
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Query
|
||||
from fastapi import Path as ApiPath
|
||||
@@ -428,7 +428,7 @@ def build_e40_case_review_router(
|
||||
limit: int = Query(default=48, ge=1, le=64),
|
||||
) -> dict[str, object]:
|
||||
catalog, _ = catalog_and_source(result_id)
|
||||
items = list(catalog["items"]) # type: ignore[arg-type]
|
||||
items = list(cast(list[dict[str, object]], catalog["items"]))
|
||||
return {
|
||||
**catalog,
|
||||
"items": items[:limit],
|
||||
|
||||
Reference in New Issue
Block a user