✏️ add typing

This commit is contained in:
yanyongyu
2021-12-21 18:22:14 +08:00
parent b900133ab4
commit 9b2fa46921
8 changed files with 35 additions and 29 deletions

View File

@ -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]]``
:说明: