🎨 代码格式化

This commit is contained in:
HibiKier 2025-06-17 17:51:13 +08:00
parent 47ca192416
commit bb3a7d9bc0

View File

@ -91,7 +91,7 @@ class ConfigGroup(BaseModel):
configs: dict[str, ConfigModel] = Field(default_factory=dict) 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, self,
module: str, module: str,
key: str, key: str,
default: T = None, default: Any = None,
*, *,
build_model: bool = True, build_model: bool = True,
) -> T | Any: ) -> Any:
""" """
获取指定配置值自动构建Pydantic模型或其它类型实例 获取指定配置值自动构建Pydantic模型或其它类型实例
- 兼容Pydantic V1/V2 - 兼容Pydantic V1/V2