From bb3a7d9bc0395a8940f2e8da70c4e85165a96795 Mon Sep 17 00:00:00 2001 From: HibiKier <775757368@qq.com> Date: Tue, 17 Jun 2025 17:51:13 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhenxun/configs/utils/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zhenxun/configs/utils/__init__.py b/zhenxun/configs/utils/__init__.py index 14a4899b..3e993420 100644 --- a/zhenxun/configs/utils/__init__.py +++ b/zhenxun/configs/utils/__init__.py @@ -91,7 +91,7 @@ class ConfigGroup(BaseModel): configs: dict[str, ConfigModel] = Field(default_factory=dict) """配置项列表""" - def get(self, c: str, default: T = None, *, build_model: bool = True) -> T | Any: + def get(self, c: str, default: Any = None, *, build_model: bool = True) -> Any: """ 获取配置项的值。如果指定了类型,会自动构建实例。 """ @@ -257,10 +257,10 @@ class ConfigsManager: self, module: str, key: str, - default: T = None, + default: Any = None, *, build_model: bool = True, - ) -> T | Any: + ) -> Any: """ 获取指定配置值,自动构建Pydantic模型或其它类型实例。 - 兼容Pydantic V1/V2。