diff --git a/cantok/tokens/abstract_token.py b/cantok/tokens/abstract_token.py index dc0805b..a80b69f 100644 --- a/cantok/tokens/abstract_token.py +++ b/cantok/tokens/abstract_token.py @@ -98,7 +98,7 @@ def keep_on(self) -> bool: def is_cancelled(self, direct: bool = True) -> bool: return self.get_report(direct=direct).cause != CancelCause.NOT_CANCELLED - def wait(self, step: Union[int, float] = 0.0001, timeout: Optional[Union[int, float]] = None, is_async: bool = False) -> Awaitable[None]: + def wait(self, step: Union[int, float] = 0.0001, timeout: Optional[Union[int, float]] = None, is_async: bool = False) -> Awaitable: if step < 0: raise ValueError('The token polling iteration time cannot be less than zero.') if timeout is not None and timeout < 0: @@ -115,7 +115,7 @@ def wait(self, step: Union[int, float] = 0.0001, timeout: Optional[Union[int, fl token = self + local_token - async def async_wait() -> Awaitable[None]: + async def async_wait() -> Awaitable: while token: await async_sleep(step)