From ceecf9c692f23297cd314eaf5a3a0c9c7bd0ad5b Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sun, 18 Dec 2022 15:53:25 +0800 Subject: [PATCH] :bug: fix on_type typing error (#1482) --- nonebot/plugin/on.py | 2 +- nonebot/plugin/on.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nonebot/plugin/on.py b/nonebot/plugin/on.py index 5b18eb10..d81dadea 100644 --- a/nonebot/plugin/on.py +++ b/nonebot/plugin/on.py @@ -439,7 +439,7 @@ def on_regex( def on_type( - types: Union[Type[Event], Tuple[Type[Event]]], + types: Union[Type[Event], Tuple[Type[Event], ...]], rule: Optional[Union[Rule, T_RuleChecker]] = None, *, _depth: int = 0, diff --git a/nonebot/plugin/on.pyi b/nonebot/plugin/on.pyi index ec45e05e..ae399bad 100644 --- a/nonebot/plugin/on.pyi +++ b/nonebot/plugin/on.pyi @@ -154,7 +154,7 @@ def on_regex( state: Optional[T_State] = ..., ) -> Type[Matcher]: ... def on_type( - types: Union[Type[Event], Tuple[Type[Event]]], + types: Union[Type[Event], Tuple[Type[Event], ...]], rule: Optional[Union[Rule, T_RuleChecker]] = ..., *, permission: Optional[Union[Permission, T_PermissionChecker]] = ...,