mirror of
https://github.com/ChenXu233/nonebot_plugin_dialectlist.git
synced 2024-11-23 23:55:29 +08:00
🚸 向下兼容 pydantic 1.10
This commit is contained in:
parent
66822db011
commit
c181d6ae93
@ -13,13 +13,6 @@ class ScopedConfig(BaseModel):
|
|||||||
excluded_people: List[str] = [] # 排除的人的QQ号
|
excluded_people: List[str] = [] # 排除的人的QQ号
|
||||||
visualization_type: Literal["饼图", "圆环图", "柱状图"] = "圆环图" # 可视化方案
|
visualization_type: Literal["饼图", "圆环图", "柱状图"] = "圆环图" # 可视化方案
|
||||||
|
|
||||||
@field_validator("get_num")
|
|
||||||
@classmethod
|
|
||||||
def check_priority(cls, v: int) -> int:
|
|
||||||
if v >= 1:
|
|
||||||
return v
|
|
||||||
raise ValueError("表中的人数必须大于一")
|
|
||||||
|
|
||||||
|
|
||||||
class Config(BaseModel):
|
class Config(BaseModel):
|
||||||
dialectlist: ScopedConfig = ScopedConfig()
|
dialectlist: ScopedConfig = ScopedConfig()
|
||||||
|
Loading…
Reference in New Issue
Block a user