From 465f0e2be1bdedadc751e95cd43fb9dc90c4ff71 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 23 Apr 2025 16:56:50 -0600 Subject: [PATCH] Fix typing --- frigate/object_detection/base.py | 2 +- frigate/watchdog.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/object_detection/base.py b/frigate/object_detection/base.py index eca6f83c1..b463f7d0d 100644 --- a/frigate/object_detection/base.py +++ b/frigate/object_detection/base.py @@ -157,7 +157,7 @@ class ObjectDetectProcess: self.detection_queue = detection_queue self.avg_inference_speed = Value("d", 0.01) self.detection_start = Value("d", 0.0) - self.detect_process = None + self.detect_process: util.Process | None = None self.detector_config = detector_config self.start_or_restart() diff --git a/frigate/watchdog.py b/frigate/watchdog.py index cd7614a90..4c49de1a0 100644 --- a/frigate/watchdog.py +++ b/frigate/watchdog.py @@ -33,9 +33,9 @@ class FrigateWatchdog(threading.Thread): detector.start_or_restart() elif ( detector.detect_process is not None - and not detector.detect_process.is_alive() # type: ignore[unreachable] + and not detector.detect_process.is_alive() ): - logger.info("Detection appears to have stopped. Exiting Frigate...") # type: ignore[unreachable] + logger.info("Detection appears to have stopped. Exiting Frigate...") restart_frigate() logger.info("Exiting watchdog...")