From 4deae8f00c776798a403ce658dd084bbe9db19fa Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sat, 20 Aug 2022 10:17:52 +0800 Subject: [PATCH] :fire: remove deprecated State param (#1160) --- nonebot/internal/params.py | 6 ------ nonebot/params.py | 2 -- 2 files changed, 8 deletions(-) diff --git a/nonebot/internal/params.py b/nonebot/internal/params.py index adc42b33..67800b60 100644 --- a/nonebot/internal/params.py +++ b/nonebot/internal/params.py @@ -252,12 +252,6 @@ class StateInner(T_State): ... -def State() -> T_State: - """**Deprecated**: 事件处理状态参数,请直接使用 {ref}`nonebot.typing.T_State`""" - warnings.warn("State() is deprecated, use `T_State` instead", DeprecationWarning) - return StateInner() - - class StateParam(Param): """事件处理状态参数""" diff --git a/nonebot/params.py b/nonebot/params.py index a2c8f265..514290a1 100644 --- a/nonebot/params.py +++ b/nonebot/params.py @@ -11,7 +11,6 @@ from nonebot.typing import T_State from nonebot.matcher import Matcher from nonebot.adapters import Event, Message from nonebot.internal.params import Arg as Arg -from nonebot.internal.params import State as State from nonebot.internal.params import ArgStr as ArgStr from nonebot.internal.params import Depends as Depends from nonebot.internal.params import ArgParam as ArgParam @@ -174,7 +173,6 @@ def LastReceived(default: Any = None) -> Any: __autodoc__ = { "Arg": True, - "State": True, "ArgStr": True, "Depends": True, "ArgParam": True,