-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
98 lines (93 loc) · 2.93 KB
/
pyproject.toml
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
[project]
name = "bot-xiaomai-open"
version = "0.3.0"
description = "GNU GENERAL PUBLIC LICENSE"
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = [
"graia-ariadne[standard]>=0.11.7",
"graia-amnesia>=0.7.1",
"graia-saya>=0.0.19",
"graia-scheduler>=0.2.0",
"graiax-fastapi>=0.3.1",
"graiax-playwright>=0.2.7",
"graiax-text2img-playwright>=0.4.2",
"launart==0.6.4",
"httpx>=0.27.0",
"httpx>=0.27.0",
"h11>=0.14.0",
"creart>=0.3.0",
"sqlalchemy>=2.0.30",
"pyyaml>=6.0.1",
"aiosqlite>=0.20.0",
"psutil>=5.9.8",
"arclet-alconna-graia>=0.18.2",
"jinja2>=3.1.4",
"markdown-it-py>=3.0.0",
"mdit-py-plugins>=0.4.0",
"unwind==0.4.0",
"aiofiles>=23.2.1",
"zhconv>=1.4.0",
"bs4>=0.0.2",
"requests>=2.31.0",
"jieba>=0.42.1",
"picimagesearch>=3.10.2",
"imageio>=2.34.1",
"bilireq>=0.2.13",
"qrcode>=7.4.2",
"grpcio>=1.63.0",
"grpcio-status==1.63.0",
"pypinyin>=0.51.0",
"gitpython>=3.1.43",
"revchatgpt>=6.8.6",
"rapidfuzz>=3.9.0",
"noneprompt>=0.1.9",
"alembic>=1.13.1",
"uvicorn>=0.29.0",
"pillow>=10.3.0",
"matplotlib>=3.8.4",
"pandas>=2.2.2",
"seaborn>=0.13.2",
"pexpect>=4.9.0",
"starlette>=0.37.2",
"playwright==1.41.2",
"curl-cffi>=0.7.1",
"markdown>=3.7",
"selenium>=4.28.1",
"webdriver-manager>=4.0.2",
"pygments>=2.19.1",
"python-markdown-math>=0.8",
"pymdown-extensions>=10.14.2",
"openai>=1.65.0",
"duckduckgo-search>=7.3.1",
"mcstatus>=11.1.1",
"restrictedpython>=8.0",
"scipy>=1.15.1",
"pre-commit>=4.1.0",
]
# 配置 Ruff 的整体行为
[tool.ruff]
line-length = 88 # Black 默认 88,可以改回 79 如果严格遵守 PEP 8
# 配置 Ruff 的代码检查功能(Linting)
[tool.ruff.lint]
# 选择要启用的规则集
select = [
"E", # PEP 8 代码格式错误(空格、缩进、换行)
"F", # Pyflakes 代码检查(未使用变量、重复导入、变量未定义等)
"W", # 一般代码风格警告(行尾空格、缩进警告)
"UP" # Python 版本升级检查(建议 Python 3 代码优化)
]
# 忽略特定规则
ignore = [
"E266", # 过多的 `#` 号用于注释(通常用于代码分割)
"E501", # 行长度超过限制(Ruff 已经使用 `line-length` 处理)
# "F401", # 导入未使用的模块(有时用于动态导入),应该使用 # noqa: F401 或 if TYPE_CHECKING 方式更精准地控制 Ruff 规则。
]
# 代码格式化配置(类似于 Black)
[tool.ruff.format]
quote-style = "double" # 统一使用双引号
indent-style = "space" # 统一使用空格缩进,而不是 Tab
docstring-code-format = true # 启用 docstring 代码片段格式化
# 配置 Ruff 的 PyUpgrade 功能(Python 版本兼容性优化)
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true # 保留 `from __future__ import annotations`,避免影响运行时类型检查