Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use better return types #440

Merged
merged 1 commit into from
Sep 29, 2022
Merged
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
6 changes: 3 additions & 3 deletions google_nest_sdm/event_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ async def get_clip_thumbnail_from_token(self, event_token: str) -> Media | None:
self._diagnostics.increment("get_clip.success")
return Media(contents, EventImageType.IMAGE_PREVIEW)

async def async_events(self) -> Iterable[ImageEventBase]:
async def async_events(self) -> list[ImageEventBase]:
"""Return revent events."""
self._diagnostics.increment("load_events")
result = await self._visible_items()
Expand All @@ -748,7 +748,7 @@ def _get_event(x: EventMediaModelItem) -> ImageEventBase:
event_result.sort(key=lambda x: x.timestamp, reverse=True)
return event_result

async def async_image_sessions(self) -> Iterable[ImageSession]:
async def async_image_sessions(self) -> list[ImageSession]:
"""Return revent events."""
self._diagnostics.increment("load_image_sessions")

Expand All @@ -771,7 +771,7 @@ def _get_session(x: ImageEventBase) -> ImageSession:
event_result.sort(key=lambda x: x.timestamp, reverse=True)
return event_result

async def async_clip_preview_sessions(self) -> Iterable[ClipPreviewSession]:
async def async_clip_preview_sessions(self) -> list[ClipPreviewSession]:
"""Return revent events."""
self._diagnostics.increment("load_clip_previews")

Expand Down