-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (112 loc) · 4.34 KB
/
Copy pathpyproject.toml
File metadata and controls
125 lines (112 loc) · 4.34 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
115
116
117
118
119
120
121
122
123
124
125
[project]
name = "sakuraisenrin"
version = "3.0.0"
description = "🥰 A powerful and cute QQ bot designed for galgame enthusiasts, powered by NoneBot2. | 原来你也玩 GalGame?"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"aiosqlite>=0.22.1",
"aioboto3>=15.5.0",
"arrow>=1.4.0",
"greenlet>=3.3.1",
"httpx>=0.28.1",
"nonebot-adapter-onebot>=2.4.6",
"nonebot-plugin-apscheduler>=0.5.0",
"nonebot2[fastapi]>=2.4.4",
"pil-utils>=0.2.2",
"pillow>=11.3.0",
"pilmoji[requests]>=2.0.5",
"sentry-sdk>=2.50.0",
"sqlalchemy>=2.0.46",
"picimagesearch>=3.12.11",
"imagehash>=4.3.2",
"markdown-it-py>=3.0.0",
"pybktree>=1.1",
"zstandard>=0.25.0",
"squarify>=0.4.4",
"urllib3>=2.7.0",
"starlette>=1.3.1",
]
[tool.uv]
index-url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"ANN", # flake8-annotations
"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
"COM", # flake8-commas
]
ignore = [
"ANN401",
"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
"COM812", # missing-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
]
extend-select = ["TID251"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"datetime.datetime.now".msg = "禁止直接调用,请统一使用项目提供的 get_current_time()"
"datetime.datetime.utcnow".msg = "utcnow 已被 Python 官方废弃,请统一使用 get_current_time()"
"datetime.date.today".msg = "禁止直接获取日期,请统一使用 get_current_time()"
"time.time".msg = "禁止直接获取时间戳,请统一使用 get_current_time()"
"arrow.now".msg = "禁止直接调用 arrow.now,请统一使用 get_current_time()"
"arrow.utcnow".msg = "禁止直接调用 arrow.utcnow,请统一使用 get_current_time()"
"src.lib.message_delivery.deliver_single_message".msg = "插件与 hook 不得直接调用 deliver_single_message(...);请统一使用 DeliveryPlan + deliver_message_plan(...)"
"src.lib.message_delivery.resolve_delivery_target".msg = "插件与 hook 不得直接调用 resolve_delivery_target(...);请统一使用 DeliveryPlan + deliver_message_plan(...)"
"src.lib.message_delivery.deliver_forward_messages".msg = "插件与 hook 不得直接调用 deliver_forward_messages(...);请统一使用 DeliveryPlan + deliver_message_plan(...)"
"src.lib.onebot_forward.send_custom_forward".msg = "插件与 hook 不得直接调用 send_custom_forward(...);请统一使用 DeliveryPlan + deliver_message_plan(...)"
[tool.ruff.lint.isort]
force-sort-within-sections = true
extra-standard-library = ["typing_extensions"]
[tool.ruff.lint.per-file-ignores]
"src/locales/*.py" = ["E501"]
"src/lib/i18n/keys.py" = ["E501"]
"src/lib/i18n/runtime.py" = ["TID251"]
"src/lib/message_api_hooks.py" = ["TID251"]
"src/lib/message_delivery.py" = ["TID251"]
"src/lib/message_plan.py" = ["TID251"]
"src/services/startup_sync.py" = ["TID251"]
"tests/test_message_delivery_forward.py" = ["TID251"]
"tests/test_onebot_forward.py" = ["TID251"]
"tests/test_plugin_docs_*.py" = ["F403", "F405"]
"tests/plugins/wordbank/test_media_*.py" = ["F403", "F405"]
"tests/plugins/wordbank/test_migration_*.py" = ["F403", "F405"]
"tests/plugins/wordbank/test_repository_*.py" = ["F403", "F405"]
"tests/plugins/water/test_repository_edges_part*.py" = ["F403", "F405", "PYI036"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[dependency-groups]
dev = [
"aiosqlite>=0.22.1",
"nonebug>=0.4,<0.5",
"psycopg2-binary>=2.9.11",
"pyright>=1.1.408",
"pytest>=8.3,<9",
"pytest-asyncio>=1.3.0",
"ruff>=0.14.14",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"