mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-31 15:06:42 +00:00 
			
		
		
		
	✨ Feature: 为 Matcher.HANDLER_PARAM_TYPES 补增类型 (#2352)
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
		| @@ -13,6 +13,7 @@ from typing import ( | |||||||
|     Any, |     Any, | ||||||
|     List, |     List, | ||||||
|     Type, |     Type, | ||||||
|  |     Tuple, | ||||||
|     Union, |     Union, | ||||||
|     TypeVar, |     TypeVar, | ||||||
|     Callable, |     Callable, | ||||||
| @@ -26,7 +27,7 @@ from typing import ( | |||||||
| from nonebot.log import logger | from nonebot.log import logger | ||||||
| from nonebot.internal.rule import Rule | from nonebot.internal.rule import Rule | ||||||
| from nonebot.utils import classproperty | 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.permission import User, Permission | ||||||
| from nonebot.internal.adapter import ( | from nonebot.internal.adapter import ( | ||||||
|     Bot, |     Bot, | ||||||
| @@ -159,7 +160,7 @@ class Matcher(metaclass=MatcherMeta): | |||||||
|     _default_permission_updater: ClassVar[Optional[Dependent[Permission]]] = None |     _default_permission_updater: ClassVar[Optional[Dependent[Permission]]] = None | ||||||
|     """事件响应器权限更新函数""" |     """事件响应器权限更新函数""" | ||||||
|  |  | ||||||
|     HANDLER_PARAM_TYPES = ( |     HANDLER_PARAM_TYPES: ClassVar[Tuple[Type[Param], ...]] = ( | ||||||
|         DependParam, |         DependParam, | ||||||
|         BotParam, |         BotParam, | ||||||
|         EventParam, |         EventParam, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user