mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
🏷️ fix typing error
This commit is contained in:
parent
c0af89a6ad
commit
943de58826
@ -22,6 +22,7 @@ from typing import (
|
||||
Callable,
|
||||
Optional,
|
||||
Awaitable,
|
||||
Coroutine,
|
||||
AsyncGenerator,
|
||||
ContextManager,
|
||||
)
|
||||
@ -99,7 +100,7 @@ def is_async_gen_callable(call: Callable[..., Any]) -> bool:
|
||||
return inspect.isasyncgenfunction(func_)
|
||||
|
||||
|
||||
def run_sync(call: Callable[P, R]) -> Callable[P, Awaitable[R]]:
|
||||
def run_sync(call: Callable[P, R]) -> Callable[P, Coroutine[None, None, R]]:
|
||||
"""一个用于包装 sync function 为 async function 的装饰器
|
||||
|
||||
参数:
|
||||
|
Loading…
Reference in New Issue
Block a user