File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 3434
3535from .apis import API
3636from . import hook as hook
37+ from .version import __version__
3738from .utils import DeepSeekHandler
3839from .exception import RequestException
3940from .extension import ParseExtension , CleanDocExtension
4950 extra = {
5051 "unique_name" : "DeepSeek" ,
5152 "author" :
"Komorebi <[email protected] >" ,
52- "version" : "0.1.10" ,
53+ "version" : __version__ ,
5354 },
5455)
5556
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ adapters = [
6363]
6464plugins = [" nonebot_plugin_deepseek" ]
6565
66-
6766[tool .isort ]
6867profile = " black"
6968line_length = 120
@@ -102,3 +101,11 @@ typeCheckingMode = "standard"
102101
103102[tool .pytest .ini_options ]
104103asyncio_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 = " "
You can’t perform that action at this time.
0 commit comments