From fd126ae1545a44d8421af3e8a978be5f332bb71a Mon Sep 17 00:00:00 2001 From: Tarrailt <3165388245@qq.com> Date: Sat, 9 Sep 2023 20:58:50 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Feature:=20=E4=B8=BA=20Matcher.HAN?= =?UTF-8?q?DLER=5FPARAM=5FTYPES=20=E8=A1=A5=E5=A2=9E=E7=B1=BB=E5=9E=8B=20(?= =?UTF-8?q?#2352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> --- nonebot/internal/matcher/matcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nonebot/internal/matcher/matcher.py b/nonebot/internal/matcher/matcher.py index cf620eaa..c3518603 100644 --- a/nonebot/internal/matcher/matcher.py +++ b/nonebot/internal/matcher/matcher.py @@ -13,6 +13,7 @@ from typing import ( Any, List, Type, + Tuple, Union, TypeVar, Callable, @@ -26,7 +27,7 @@ from typing import ( from nonebot.log import logger from nonebot.internal.rule import Rule from nonebot.utils import classproperty -from nonebot.dependencies import Dependent +from nonebot.dependencies import Param, Dependent from nonebot.internal.permission import User, Permission from nonebot.internal.adapter import ( Bot, @@ -159,7 +160,7 @@ class Matcher(metaclass=MatcherMeta): _default_permission_updater: ClassVar[Optional[Dependent[Permission]]] = None """事件响应器权限更新函数""" - HANDLER_PARAM_TYPES = ( + HANDLER_PARAM_TYPES: ClassVar[Tuple[Type[Param], ...]] = ( DependParam, BotParam, EventParam,