chore(types): tighten E40 review collections
This commit is contained in:
@@ -8,7 +8,7 @@ from collections.abc import Iterator
|
||||
from contextlib import contextmanager
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Final, Literal
|
||||
from typing import Final, Literal, cast
|
||||
|
||||
from k1link.artifacts import utc_now_iso, write_json_atomic
|
||||
|
||||
@@ -229,7 +229,9 @@ class E40OperatorReviewStore:
|
||||
substrate=substrate,
|
||||
reviewer_id=reviewer_id,
|
||||
)
|
||||
decisions = list(current["decisions"]) # type: ignore[arg-type]
|
||||
decisions = list(
|
||||
cast(list[dict[str, object]], current["decisions"])
|
||||
)
|
||||
replay = next(
|
||||
(
|
||||
decision
|
||||
|
||||
@@ -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