From cfdee9952c4616b6d825fc73085a03a69df52f11 Mon Sep 17 00:00:00 2001 From: IceBotYT <34712694+IceBotYT@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:41:18 -0400 Subject: [PATCH] Fix typing issue with get_sensors --- .gitignore | 5 ++++- setup.cfg | 2 +- src/lacrosse_view/__init__.py | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 718aa58..8207943 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,7 @@ target/ .mypy_cache/ # Basic test, nothing special -src/test.py \ No newline at end of file +src/test.py + +# Output from various tests +*.txt \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 1dbe362..fe30fc4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = lacrosse_view -version = 0.0.6 +version = 0.0.7 author = IceBotYT author_email = icebotyt@outlook.com description = Client for retrieving data from the La Crosse View cloud diff --git a/src/lacrosse_view/__init__.py b/src/lacrosse_view/__init__.py index dec82c9..1bb8369 100644 --- a/src/lacrosse_view/__init__.py +++ b/src/lacrosse_view/__init__.py @@ -8,12 +8,12 @@ from pytz import timezone import datetime import asyncio -from collections.abc import Awaitable, Callable +from collections.abc import Coroutine, Callable def _retry( - func: Callable[..., Awaitable[list[Sensor]]] -) -> Callable[..., Awaitable[list[Sensor]]]: + func: Any +) -> Any: """Handle query retries.""" async def wrapper(obj, *args, **kwargs) -> list[Sensor]: @@ -120,7 +120,7 @@ async def get_sensors( tz: str = "America/New_York", start: str = "", end: str = "", - ) -> list[dict[str, Any]]: + ) -> list[Sensor]: """Get all sensors.""" if self.token == "":