forked from Github/frigate
Typing: mypy fixes for
* __main__.py * app.py * models.py * plus.py * stats.py In addition a new module was introduced: types There all TypedDicts are included. Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
This commit is contained in:
committed by
Blake Blackshear
parent
ebf4e43ced
commit
cafe0917c7
28
frigate/types.py
Normal file
28
frigate/types.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import Optional, TypedDict
|
||||
from multiprocessing.queues import Queue
|
||||
from multiprocessing.sharedctypes import Synchronized
|
||||
from multiprocessing.context import Process
|
||||
|
||||
from frigate.edgetpu import EdgeTPUProcess
|
||||
|
||||
|
||||
class CameraMetricsTypes(TypedDict):
|
||||
camera_fps: Synchronized
|
||||
capture_process: Optional[Process]
|
||||
detection_enabled: Synchronized
|
||||
detection_fps: Synchronized
|
||||
detection_frame: Synchronized
|
||||
ffmpeg_pid: Synchronized
|
||||
frame_queue: Queue
|
||||
improve_contrast_enabled: Synchronized
|
||||
process: Optional[Process]
|
||||
process_fps: Synchronized
|
||||
read_start: Synchronized
|
||||
skipped_fps: Synchronized
|
||||
|
||||
|
||||
class StatsTrackingTypes(TypedDict):
|
||||
camera_metrics: dict[str, CameraMetricsTypes]
|
||||
detectors: dict[str, EdgeTPUProcess]
|
||||
started: int
|
||||
latest_frigate_version: str
|
||||
Reference in New Issue
Block a user