Skip to content

Commit 75007e0

Browse files
committed
🚑 回退 e22080b
1 parent 699c41d commit 75007e0

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

nonebot_plugin_deepseek/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
from .apis import API
3636
from . import hook as hook
37+
from .version import __version__
3738
from .utils import DeepSeekHandler
3839
from .exception import RequestException
3940
from .extension import ParseExtension, CleanDocExtension
@@ -49,7 +50,7 @@
4950
extra={
5051
"unique_name": "DeepSeek",
5152
"author": "Komorebi <[email protected]>",
52-
"version": "0.1.10",
53+
"version": __version__,
5354
},
5455
)
5556

nonebot_plugin_deepseek/version.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from importlib.metadata import metadata
2+
3+
from nonebot.compat import PYDANTIC_V2
4+
from pydantic import BaseModel, ConfigDict
5+
6+
7+
class Metadata(BaseModel):
8+
name: str
9+
version: str
10+
summary: str
11+
12+
if PYDANTIC_V2:
13+
model_config = ConfigDict(extra="allow")
14+
else:
15+
16+
class Config:
17+
extra = "allow"
18+
19+
20+
__metadata__ = Metadata(**metadata("nonebot-plugin-deepseek").json) # type: ignore
21+
22+
__version__ = __metadata__.version

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ adapters = [
6363
]
6464
plugins = ["nonebot_plugin_deepseek"]
6565

66-
6766
[tool.isort]
6867
profile = "black"
6968
line_length = 120
@@ -102,3 +101,11 @@ typeCheckingMode = "standard"
102101

103102
[tool.pytest.ini_options]
104103
asyncio_mode = "auto"
104+
105+
[build-system]
106+
requires = ["uv_build>=0.8.2,<0.9.0"]
107+
build-backend = "uv_build"
108+
109+
[tool.uv.build-backend]
110+
module-name = "nonebot_plugin_deepseek"
111+
module-root = ""

0 commit comments

Comments
 (0)