mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 02:50:48 +00:00
⚡ improve dependency cache
This commit is contained in:
@ -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:
|
||||
"""
|
||||
:说明:
|
||||
|
Reference in New Issue
Block a user