From a417c7484bbb92bc10b576ddaef820e80cdc5b5c Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Sun, 1 Dec 2024 15:35:49 +0800 Subject: [PATCH] fixed mypy --- src/pwo/notification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pwo/notification.py b/src/pwo/notification.py index 524e76e..a80bca4 100644 --- a/src/pwo/notification.py +++ b/src/pwo/notification.py @@ -25,12 +25,12 @@ class Subscriber: async def wait(self, tout: Optional[float]) -> bool: - future = self._loop.create_future() + future: Future[bool] = self._loop.create_future() self._event = future try: async with timeout(tout): log.debug('Subscriber %s is waiting for an event', id(self)) - await future + return await future except TimeoutError: return False