mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-07 12:36:47 +00:00
✏️ add typing
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
.. _typing:
|
||||
https://docs.python.org/3/library/typing.html
|
||||
"""
|
||||
from asyncio import Task
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
@ -32,6 +31,8 @@ from typing import (
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from asyncio import Task
|
||||
|
||||
from nonebot.adapters import Bot, Event
|
||||
from nonebot.permission import Permission
|
||||
|
||||
@ -249,7 +250,7 @@ T_PermissionUpdater = Callable[..., Union["Permission", Awaitable["Permission"]]
|
||||
|
||||
PermissionUpdater 在 Matcher.pause, Matcher.reject 时被运行,用于更新会话对象权限。默认会更新为当前事件的触发对象。
|
||||
"""
|
||||
T_DependencyCache = Dict[Callable[..., Any], Task[Any]]
|
||||
T_DependencyCache = Dict[Callable[..., Any], "Task[Any]"]
|
||||
"""
|
||||
:类型: ``Dict[Callable[..., Any], Task[Any]]``
|
||||
:说明:
|
||||
|
Reference in New Issue
Block a user