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

Update dependencies and make pyright happy #27

Merged
merged 2 commits into from
Feb 18, 2024
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
7 changes: 3 additions & 4 deletions greeneye/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,8 @@ async def _configure_from_settings(
LOG.info(f"Configured {self.serial_number} from settings API call.")

for listener in self._listeners:
coroutines.append(_ensure_coroutine(listener)())
coroutine: Callable[[], Awaitable[None]] = _ensure_coroutine(listener)
coroutines.append(coroutine())
await asyncio.gather(*coroutines)

async def _configure_from_packet(self, packet: Packet) -> None:
Expand Down Expand Up @@ -622,9 +623,7 @@ async def handle_packet(self, packet: Packet) -> None:


async def _invoke_listeners(listeners: List[Listener]) -> None:
coroutines: list[Awaitable[None]] = [
_ensure_coroutine(listener)() for listener in listeners
]
coroutines = [_ensure_coroutine(listener)() for listener in listeners]
if len(coroutines) > 0:
await asyncio.gather(*coroutines)

Expand Down
Loading
Loading