fix: wrong type hint

This commit is contained in:
adbenitez
2023-10-17 17:18:25 +02:00
parent 8573649bf7
commit df7c44ae42

View File

@@ -3,7 +3,6 @@ import logging
from typing import ( from typing import (
TYPE_CHECKING, TYPE_CHECKING,
Callable, Callable,
Coroutine,
Dict, Dict,
Iterable, Iterable,
Optional, Optional,
@@ -92,7 +91,7 @@ class Client:
"""Process events forever.""" """Process events forever."""
self.run_until(lambda _: False) self.run_until(lambda _: False)
def run_until(self, func: Callable[[AttrDict], Union[bool, Coroutine]]) -> AttrDict: def run_until(self, func: Callable[[AttrDict], bool]) -> AttrDict:
"""Process events until the given callable evaluates to True. """Process events until the given callable evaluates to True.
The callable should accept an AttrDict object representing the The callable should accept an AttrDict object representing the