eventloop: fix FlexCallback annotation
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
ac23f00d1f
commit
484c4aea59
|
@ -11,16 +11,16 @@ import functools
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
|
Awaitable,
|
||||||
Callable,
|
Callable,
|
||||||
Coroutine,
|
Coroutine,
|
||||||
List,
|
|
||||||
Optional,
|
Optional,
|
||||||
TypeVar
|
TypeVar
|
||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
_T = TypeVar("_T")
|
_T = TypeVar("_T")
|
||||||
FlexCallback = Callable[..., Optional[Coroutine]]
|
FlexCallback = Callable[..., Optional[Awaitable]]
|
||||||
|
|
||||||
class EventLoop:
|
class EventLoop:
|
||||||
TimeoutError = asyncio.TimeoutError
|
TimeoutError = asyncio.TimeoutError
|
||||||
|
|
Loading…
Reference in New Issue