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...")