Inverse mypy and more mypy fixes (#22645)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions

* organize

* Improve storage mypy

* Cleanup timeline mypy

* Cleanup recording mypy

* Improve review mypy

* Add review mypy

* Inverse mypy

* Fix ffmpeg presets

* fix template thing

* Cleanup camera
This commit is contained in:
Nicolas Mowen
2026-03-25 19:30:59 -05:00
committed by GitHub
parent c0124938b3
commit 0cf9d7d5b1
14 changed files with 245 additions and 235 deletions
+10 -6
View File
@@ -8,7 +8,7 @@ from multiprocessing.synchronize import Event as MpEvent
from typing import Any
from frigate.config import FrigateConfig
from frigate.events.maintainer import EventStateEnum, EventTypeEnum
from frigate.events.types import EventStateEnum, EventTypeEnum
from frigate.models import Timeline
from frigate.util.builtin import to_relative_box
@@ -28,7 +28,7 @@ class TimelineProcessor(threading.Thread):
self.config = config
self.queue = queue
self.stop_event = stop_event
self.pre_event_cache: dict[str, list[dict[str, Any]]] = {}
self.pre_event_cache: dict[str, list[dict[Any, Any]]] = {}
def run(self) -> None:
while not self.stop_event.is_set():
@@ -56,7 +56,7 @@ class TimelineProcessor(threading.Thread):
def insert_or_save(
self,
entry: dict[str, Any],
entry: dict[Any, Any],
prev_event_data: dict[Any, Any],
event_data: dict[Any, Any],
) -> None:
@@ -84,11 +84,15 @@ class TimelineProcessor(threading.Thread):
event_type: str,
prev_event_data: dict[Any, Any],
event_data: dict[Any, Any],
) -> bool:
) -> None:
"""Handle object detection."""
camera_config = self.config.cameras.get(camera)
if camera_config is None:
return False
if (
camera_config is None
or camera_config.detect.width is None
or camera_config.detect.height is None
):
return
event_id = event_data["id"]
# Base timeline entry data that all entries will share