Skip to content

Commit

Permalink
Make pyright happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeljo committed Feb 18, 2024
1 parent 3dfd709 commit 6983596
Showing 1 changed file with 3 additions and 4 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

0 comments on commit 6983596

Please sign in to comment.