mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Enable mypy for jobs and motion and fix motion types
This commit is contained in:
parent
0f3b351cf9
commit
4c41b47aad
@ -13,10 +13,10 @@ class MotionDetector(ABC):
|
|||||||
frame_shape: Tuple[int, int, int],
|
frame_shape: Tuple[int, int, int],
|
||||||
config: MotionConfig,
|
config: MotionConfig,
|
||||||
fps: int,
|
fps: int,
|
||||||
improve_contrast,
|
improve_contrast: bool,
|
||||||
threshold,
|
threshold: int,
|
||||||
contour_area,
|
contour_area: int | None,
|
||||||
):
|
) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@ -25,7 +25,7 @@ class MotionDetector(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def is_calibrating(self):
|
def is_calibrating(self) -> bool:
|
||||||
"""Return if motion is recalibrating."""
|
"""Return if motion is recalibrating."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -35,6 +35,6 @@ class MotionDetector(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def stop(self):
|
def stop(self) -> None:
|
||||||
"""Stop any ongoing work and processes."""
|
"""Stop any ongoing work and processes."""
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -44,6 +44,12 @@ ignore_errors = false
|
|||||||
[mypy-frigate.genai]
|
[mypy-frigate.genai]
|
||||||
ignore_errors = false
|
ignore_errors = false
|
||||||
|
|
||||||
|
[mypy-frigate.jobs]
|
||||||
|
ignore_errors = false
|
||||||
|
|
||||||
|
[mypy-frigate.motion]
|
||||||
|
ignore_errors = false
|
||||||
|
|
||||||
[mypy-frigate.log]
|
[mypy-frigate.log]
|
||||||
ignore_errors = false
|
ignore_errors = false
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user