improve dependency cache

This commit is contained in:
yanyongyu
2021-12-16 23:22:25 +08:00
parent fe69735ca0
commit 3d762fcbab
15 changed files with 162 additions and 100 deletions

View File

@ -24,11 +24,10 @@ from typing import (
)
from nonebot import params
from nonebot.utils import CacheDict
from nonebot.adapters import Bot, Event
from nonebot.dependencies import Dependent
from nonebot.exception import SkippedException
from nonebot.typing import T_Handler, T_PermissionChecker
from nonebot.typing import T_Handler, T_DependencyCache, T_PermissionChecker
async def _run_coro_with_catch(coro: Coroutine[Any, Any, Any]):
@ -93,7 +92,7 @@ class Permission:
bot: Bot,
event: Event,
stack: Optional[AsyncExitStack] = None,
dependency_cache: Optional[CacheDict[T_Handler, Any]] = None,
dependency_cache: Optional[T_DependencyCache] = None,
) -> bool:
"""
:说明: