From 1c7c66043f803a10f6a7a16c15db27c3fa0c1d1b Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:47:00 +0200 Subject: [PATCH] Use better return types --- google_nest_sdm/event_media.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google_nest_sdm/event_media.py b/google_nest_sdm/event_media.py index feaf6b5f..f4477869 100644 --- a/google_nest_sdm/event_media.py +++ b/google_nest_sdm/event_media.py @@ -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() @@ -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") @@ -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")