From c4286f1f39b6a2f5115fbedf1139f2230da3ee9a Mon Sep 17 00:00:00 2001 From: Akirami <66513481+A-kirami@users.noreply.github.com> Date: Sat, 10 Dec 2022 00:12:28 +0800 Subject: [PATCH] =?UTF-8?q?:bulb:=20=E8=A1=A5=E5=85=85=20`params`=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E7=B1=BB=E5=9E=8B=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=20(#1458)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot/params.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nonebot/params.py b/nonebot/params.py index 27709d90..47e068ae 100644 --- a/nonebot/params.py +++ b/nonebot/params.py @@ -156,7 +156,7 @@ def RegexStr() -> str: return Depends(_regex_str, use_cache=False) -def _regex_group(state: T_State): +def _regex_group(state: T_State) -> Tuple[Any, ...]: return state[REGEX_GROUP] @@ -165,7 +165,7 @@ def RegexGroup() -> Tuple[Any, ...]: return Depends(_regex_group, use_cache=False) -def _regex_dict(state: T_State): +def _regex_dict(state: T_State) -> Dict[str, Any]: return state[REGEX_DICT] @@ -213,7 +213,7 @@ def Keyword() -> str: def Received(id: Optional[str] = None, default: Any = None) -> Any: """`receive` 事件参数""" - def _received(matcher: "Matcher"): + def _received(matcher: "Matcher") -> Any: return matcher.get_receive(id or "", default) return Depends(_received, use_cache=False)