Skip to content

Commit

Permalink
Update dependencies and make pyright happy (#27)
Browse files Browse the repository at this point in the history
* Make pyright happy

* Update poetry.lock
  • Loading branch information
jkeljo authored Feb 18, 2024
1 parent 568dbb8 commit ceddbfd
Show file tree
Hide file tree
Showing 2 changed files with 396 additions and 459 deletions.
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

0 comments on commit ceddbfd

Please sign in to comment.