Improve comms typing (#18599)

* Enable mypy for comms

* Make zmq data types consistent

* Cleanup inter process typing issues

* Cleanup embeddings typing

* Cleanup config updater

* Cleanup recordings updator

* Make publisher have a generic type

* Cleanup event metadata updater

* Cleanup event metadata updater

* Cleanup detections updater

* Cleanup websocket

* Cleanup mqtt

* Cleanup webpush

* Cleanup dispatcher

* Formatting

* Remove unused

* Add return type

* Fix tests

* Fix semantic triggers config typing

* Cleanup
This commit is contained in:
Nicolas Mowen
2025-08-16 10:20:33 -05:00
committed by Blake Blackshear
parent 1add72884a
commit fcf3824124
29 changed files with 168 additions and 128 deletions
+4 -4
View File
@@ -169,7 +169,7 @@ class ReviewSegmentMaintainer(threading.Thread):
CameraConfigUpdateEnum.review,
],
)
self.detection_subscriber = DetectionSubscriber(DetectionTypeEnum.all)
self.detection_subscriber = DetectionSubscriber(DetectionTypeEnum.all.value)
self.review_publisher = ReviewDataPublisher("")
# manual events
@@ -490,7 +490,7 @@ class ReviewSegmentMaintainer(threading.Thread):
if not topic:
continue
if topic == DetectionTypeEnum.video:
if topic == DetectionTypeEnum.video.value:
(
camera,
frame_name,
@@ -499,14 +499,14 @@ class ReviewSegmentMaintainer(threading.Thread):
_,
_,
) = data
elif topic == DetectionTypeEnum.audio:
elif topic == DetectionTypeEnum.audio.value:
(
camera,
frame_time,
_,
audio_detections,
) = data
elif topic == DetectionTypeEnum.api or DetectionTypeEnum.lpr:
elif topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value:
(
camera,
frame_time,