From 3df3d4482c2ad4c228e1058b32dcb2248be3133b Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 18 May 2026 12:59:04 -0500 Subject: [PATCH] mypy --- frigate/genai/llama_cpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/genai/llama_cpp.py b/frigate/genai/llama_cpp.py index 3b478e8021..86db201288 100644 --- a/frigate/genai/llama_cpp.py +++ b/frigate/genai/llama_cpp.py @@ -4,7 +4,7 @@ import base64 import io import json import logging -from typing import Any, AsyncGenerator, Optional +from typing import Any, AsyncGenerator, Optional, cast import httpx import numpy as np @@ -88,14 +88,14 @@ def _fetch_llama_props(base_url: str, model: str) -> dict[str, Any]: timeout=10, ) response.raise_for_status() - return response.json() + return cast(dict[str, Any], response.json()) except Exception: response = requests.get( f"{base_url}/upstream/{model}/props", timeout=10, ) response.raise_for_status() - return response.json() + return cast(dict[str, Any], response.json()) def _to_jpeg(img_bytes: bytes) -> bytes | None: