generated from fllesser/nonebot-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (101 loc) · 2.97 KB
/
pyproject.toml
File metadata and controls
114 lines (101 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[project]
name = "nonebot-plugin-nyaturingtest"
version = "0.2.4"
description = "也许是个有情感的聊天机器人"
readme = "README.md"
authors = [{ name = "shadow3aaa", email = "shadow3aaa@gmail.com" }]
urls = { Repository = "https://github.com/shadow3aaa/nonebot-plugin-nyaturingtest" }
requires-python = ">=3.10,<3.13"
dependencies = [
"nonebot2>=2.4.2,<3.0.0",
"nonebot-plugin-localstore>=0.7.4,<1.0.0",
"nonebot-plugin-uninfo>=0.7.3,<1.0.0",
"nonebot-adapter-onebot>=2.4.6,<3.0.0", # 仅 onebot 应取消注释
"httpx>=0.27.0,<1.0.0",
"openai>=1.78.1",
"pillow>=11.2.1",
"transformers>=4.51.3",
"anyio>=4.9.0",
"hipporag-nyabot>=2.0.0a2",
]
[dependency-groups]
dev = [
"nonebot2[fastapi]>=2.4.2,<3.0.0",
"ruff>=0.11.10,<1.0.0",
# "nonemoji>=0.1.4,<1.0.0", # 推荐全局安装 pipx install nonemoji
# "pre-commit>=4.1.0", # 推荐全局安装 pipx install pre-commit
]
test = [
"nonebot2[fastapi]>=2.4.2,<3.0.0",
"nonebot-adapter-onebot>=2.4.6,<3.0.0",
"nonebug>=0.3.7,<1.0.0",
"pytest-xdist>=3.6.1,<4.0.0",
"pytest-asyncio>=0.26.0,<1.0.0",
]
[tool.nonebot]
plugin-dirs = ["src"]
plugins = ["nonebot_plugin_localstore"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
pythonpath = ["src"]
addopts = [
"-v", # 详细输出
"-s", # 显示打印信息
"--tb=short", # 简短的错误回溯
"-ra", # 显示所有测试结果摘要
"--strict-markers", # 严格标记模式
# "--doctest-modules", # 运行文档测试
"--import-mode=prepend", # 导入模式
]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"F", # Pyflakes
"W", # pycodestyle warnings
"E", # pycodestyle errors
"I", # isort
"UP", # pyupgrade
"ASYNC", # flake8-async
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"TID", # flake8-tidy-imports
"RUF", # Ruff-specific rules
]
ignore = [
"E402", # module-import-not-at-top-of-file
"UP037", # quoted-annotation
"RUF001", # ambiguous-unicode-character-string
"RUF002", # ambiguous-unicode-character-docstring
"RUF003", # ambiguous-unicode-character-comment
"W191", # indentation contains tabs
"TID252", # relative import
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["tests/*"]
extra-standard-library = ["typing_extensions"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.pyright]
pythonVersion = "3.10"
pythonPlatform = "All"
defineConstant = { PYDANTIC_V2 = true }
executionEnvironments = [
{ root = "./tests", extraPaths = ["./src"] },
{ root = "./src" },
]
typeCheckingMode = "standard"
reportShadowedImports = false
disableBytesTypePromotions = true