✨ Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot

This commit is contained in:
HibiKier
2025-01-10 12:19:11 +08:00
committed by BalconyJH
parent 23ef00d01f
commit e814469b75
69 changed files with 178 additions and 147 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class ChartUtils:
@classmethod
async def barh(cls, data: Barh) -> BuildImage:
"""横向统计图"""
to_json = data.dict()
to_json = data.to_dict()
to_json["background_image"] = (
f"./background/{random.choice(os.listdir(BACKGROUND_PATH))}"
)