mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Enable mypy for track and fix typing errors (#19529)
* Enable mypy for track * WIP cleaning up tracked object * Fix tracked object typing * Fix typing and imports of centroid tracker * Cleanup typing * Cleanup * Formatting * Fix imports * Don't specify callable type * Type out json setting
This commit is contained in:
@@ -54,7 +54,7 @@ class CameraState:
|
||||
self.ptz_autotracker_thread = ptz_autotracker_thread
|
||||
self.prev_enabled = self.camera_config.enabled
|
||||
|
||||
def get_current_frame(self, draw_options: dict[str, Any] = {}):
|
||||
def get_current_frame(self, draw_options: dict[str, Any] = {}) -> np.ndarray:
|
||||
with self.current_frame_lock:
|
||||
frame_copy = np.copy(self._current_frame)
|
||||
frame_time = self.current_frame_time
|
||||
@@ -272,7 +272,7 @@ class CameraState:
|
||||
def finished(self, obj_id):
|
||||
del self.tracked_objects[obj_id]
|
||||
|
||||
def on(self, event_type: str, callback: Callable[[dict], None]):
|
||||
def on(self, event_type: str, callback: Callable):
|
||||
self.callbacks[event_type].append(callback)
|
||||
|
||||
def update(
|
||||
|
||||
Reference in New Issue
Block a user