diff --git a/README.md b/README.md index 63435fb..c1418a7 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,28 @@ _😅 你有几个 🐴,这么狂? 😅_ +python + + pdm-managed + + + wakatime + + +
+ + + Pydantic Version 1 Or 2 + - license + license pypi -python pypi download - - wakatime - @@ -150,6 +159,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333) ## 📝 更新日志 +### 0.2.0 + +- 适配 Pydantic V1 & V2 + ### 0.1.3 - 添加两个配置项 diff --git a/nonebot_plugin_fuckyou/__init__.py b/nonebot_plugin_fuckyou/__init__.py index ffb7efb..6359fff 100644 --- a/nonebot_plugin_fuckyou/__init__.py +++ b/nonebot_plugin_fuckyou/__init__.py @@ -3,7 +3,7 @@ from .__main__ import get_phase from .config import ConfigModel -__version__ = "0.1.4" +__version__ = "0.2.0" __plugin_meta__ = PluginMetadata( name="FuckYou", description=get_phase(), diff --git a/nonebot_plugin_fuckyou/config.py b/nonebot_plugin_fuckyou/config.py index f101508..3322900 100644 --- a/nonebot_plugin_fuckyou/config.py +++ b/nonebot_plugin_fuckyou/config.py @@ -1,6 +1,6 @@ from typing import Set -from nonebot import get_driver +from nonebot import get_plugin_config from pydantic import BaseModel @@ -15,4 +15,4 @@ class ConfigModel(BaseModel): fuckyou_bl_to_wl: bool = False -config: ConfigModel = ConfigModel.parse_obj(get_driver().config.dict()) +config = get_plugin_config(ConfigModel) diff --git a/pyproject.toml b/pyproject.toml index 20d86bc..2dee5ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-fuckyou" -version = "0.1.4" +dynamic = ["version"] description = "A NoneBot2 plugin designed for curse users" authors = [{ name = "student_2333", email = "lgc2333@126.com" }] dependencies = ["nonebot2>=2.0.0", "pydantic>=1.10.0,<2"] @@ -14,6 +14,10 @@ homepage = "https://github.com/lgc2333/nonebot-plugin-fuckyou" [tool.pdm.build] includes = [] +[tool.pdm.version] +source = "file" +path = "nonebot_plugin_fuckyou/__init__.py" + [build-system] -requires = ["pdm-pep517>=1.0.0"] -build-backend = "pdm.pep517.api" +requires = ["pdm-backend"] +build-backend = "pdm.backend"