Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/camera/services/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from app.utils.files import cleanup_images

if TYPE_CHECKING:
from collections.abc import AsyncIterator, Awaitable, Callable, Mapping
from collections.abc import AsyncGenerator, Awaitable, Callable, Mapping
from pathlib import Path

from PIL.Image import Exif
Expand Down Expand Up @@ -153,7 +153,7 @@ def stream(self) -> ActiveStreamState:
return self._stream

@contextlib.asynccontextmanager
async def _locked(self, timeout_s: float | None = None) -> AsyncIterator[None]:
async def _locked(self, timeout_s: float | None = None) -> AsyncGenerator[None]:
"""Acquire the camera lock with a timeout, then yield inside the critical section.

Callers should use ``async with self._locked():`` so exceptions, early returns,
Expand Down
2 changes: 1 addition & 1 deletion app/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _parse_list_env(v: object) -> list[str]:
if isinstance(v, list):
return cast("list[str]", v)
if not isinstance(v, str):
return cast("list[str]", list(v)) if isinstance(v, Iterable) else []
return list(v) if isinstance(v, Iterable) else []
stripped = v.strip()
if not stripped:
return []
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/camera/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self) -> None:
self.get_stream_info_mock = AsyncMock(return_value=None)

@property
def stream(self) -> ProbeStreamState:
def stream(self) -> ProbeStreamState: # ty: ignore[invalid-property-type-override]
"""Return mutable stream state for tests."""
return self.stream_probe

Expand Down
Loading
Loading