mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-28 16:20:56 +08:00
* bugfix:修复内存泄露和信号量饥饿问题 * 修复图片渲染按高度截断问题 * 优化图片渲染速度 * 权限检查去掉无效引用代码 * 添加uv支持 * 🚨 auto fix by pre-commit hooks * bugfix:修改gitignore换行 * bugfix:修复测试没有新生成uv.lock * 修复导入错误 * bugfix:移除重复调用 * 🚨 auto fix by pre-commit hooks * 清理残余poetry引用 * 更新uv安装方式 * 修复阿里云获取问题 * 增加资源下载提示 * 🚨 auto fix by pre-commit hooks * 修改资源下载为流式 * 🚨 auto fix by pre-commit hooks * 提高启动速度 * 移除bot.py支持 * 🚨 auto fix by pre-commit hooks * 优化win脚本逻辑 * 🚨 auto fix by pre-commit hooks * 清理残余无效逻辑 * 代码改进 * 🚨 auto fix by pre-commit hooks * 增加数据库迁移存在性检查 * 🚨 auto fix by pre-commit hooks * chore(test): 添加pytest超时控制和优雅关闭机制 - 在GitHub Actions工作流中添加作业级和步骤级超时限制,防止测试无限期挂起 - 添加pytest-timeout依赖并配置全局超时为120秒 - 在send_queue服务添加关闭钩子,确保worker任务正确取消 - 在priority_manager添加on_shutdown钩子,支持优先级生命周期的关闭阶段 * chore(lint): 禁用超长行的lint警告 * Modify restart logic for Windows platform * 🚨 auto fix by pre-commit hooks * bugfix:修复sys导入问题 * 清理无效结构 * bugfix:修复路径问题 * bugfix:修复shell语法传递给git导致资源获取失败问题 * 优化关闭显示 * bugfix:修复路径问题 * bugfix:增加路径安全 * bugfix:修复orm绕过问题 * 放宽numpy版本限制 * 修改重启方案 * bugfix:修复循环导入 * 优化逻辑 * Enhance disconnect function with error handling Added error handling for disconnect function and imported ConfigurationError. * Implement emergency restart mechanism Added emergency restart mechanism using atexit to ensure process restart even on severe exceptions during shutdown. * 🚨 auto fix by pre-commit hooks * 重启行为归一化 * 修复测试检测问题 * bugfix:修复测试侧类型报错问题 * 引入launcher机制 * 移除重启测试 * 收紧缓存调用路径 * 类型注解收敛 * 优化浏览器回收行为 * 优化浏览器渲染 * bugfix:解决重复关闭浏览器问题 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: ManyManyTomato <93612024+ATTomatoo@users.noreply.github.com> Co-authored-by: AkashiCoin <l1040186796@gmail.com>
150 lines
3.9 KiB
TOML
150 lines
3.9 KiB
TOML
[project]
|
|
name = "zhenxun-bot-env-pydantic-v2"
|
|
version = "0.2.4"
|
|
description = "基于 Nonebot2 和 go-cqhttp 开发,以 postgresql 作为数据库,非常可爱的绪山真寻bot"
|
|
authors = [{ name = "HibiKier", email = "775757368@qq.com" }]
|
|
license = { text = "AGPL-3.0" }
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"playwright>=1.41.1,<2.0.0",
|
|
"nonebot-adapter-onebot>=2.3.1",
|
|
"nonebot-plugin-apscheduler>=0.5,<0.6",
|
|
"tortoise-orm>=0.20.0,<0.21.0",
|
|
"cattrs>=23.2.3,<24.0.0",
|
|
"ruamel-yaml>=0.18.5,<0.19.0",
|
|
"strenum>=0.4.15,<0.5.0",
|
|
"nonebot-plugin-session>=0.3.2,<0.4.0",
|
|
"ujson>=5.9.0",
|
|
"nb-cli>=1.3.0",
|
|
"nonebot2[fastapi]>=2.3.3",
|
|
"pillow>=10.0.0,<11.0.0",
|
|
"retrying>=1.3.4,<2.0.0",
|
|
"aiofiles>=23.2.1,<24.0.0",
|
|
"nonebot-plugin-htmlrender>=0.6.0,<1.0.0",
|
|
"pypinyin>=0.51.0",
|
|
"beautifulsoup4>=4.12.3,<5.0.0",
|
|
"lxml>=5.1.0,<6.0.0",
|
|
"psutil>=5.9.8,<6.0.0",
|
|
"feedparser>=6.0.11,<7.0.0",
|
|
"imagehash>=4.3.1,<5.0.0",
|
|
"cn2an>=0.5.22,<0.6.0",
|
|
"dateparser>=1.2.0,<2.0.0",
|
|
"python-jose[cryptography]>=3.3.0,<4.0.0",
|
|
"python-multipart>=0.0.9,<0.1.0",
|
|
"aiocache[redis]>=0.12.3,<0.13.0",
|
|
"py-cpuinfo>=9.0.0,<10.0.0",
|
|
"nonebot-plugin-alconna>=0.56.0",
|
|
"tenacity>=9.0.0,<10.0.0",
|
|
"nonebot-plugin-uninfo>=0.7.3",
|
|
"nonebot-plugin-waiter>=0.8.1,<0.9.0",
|
|
"multidict>=6.0.0,!=6.3.2",
|
|
"pydantic>=2.0.0,<3.0.0",
|
|
"json-repair>=0.54.0,<0.55.0",
|
|
"alibabacloud-devops20210625>=5.0.2,<6.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
redis = ["redis>=5"]
|
|
postgresql = ["asyncpg>=0.20.0"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"nonebug>=0.4,<0.5",
|
|
"pytest-cov>=5.0.0,<6.0.0",
|
|
"pytest-mock>=3.6.1,<4.0.0",
|
|
"pytest-asyncio>=0.25,<0.26",
|
|
"pytest-xdist>=3.3.1,<4.0.0",
|
|
"respx>=0.21.1,<0.22.0",
|
|
"ruff>=0.8.0,<0.9.0",
|
|
"pre-commit>=4.0.0,<5.0.0",
|
|
]
|
|
|
|
[tool.uv]
|
|
package = false
|
|
|
|
[[tool.uv.index]]
|
|
name = "aliyun"
|
|
url = "https://mirrors.aliyun.com/pypi/simple/"
|
|
|
|
[tool.nonebot]
|
|
plugins = [
|
|
"nonebot_plugin_apscheduler",
|
|
"nonebot_plugin_session",
|
|
"nonebot_plugin_htmlrender",
|
|
"nonebot_plugin_alconna",
|
|
]
|
|
plugin_dirs = ["zhenxun/services", "zhenxun/builtin_plugins", "zhenxun/plugins"]
|
|
adapters = [
|
|
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
|
|
# { name = "DoDo", module_name = "nonebot.adapters.dodo" },
|
|
# { name = "开黑啦", module_name = "nonebot.adapters.kaiheila" },
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
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
|
|
"TID252", # relative-imports
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
force-sort-within-sections = true
|
|
known-first-party = ["zhenxun", "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 = [
|
|
"./",
|
|
] },
|
|
{ root = "./" },
|
|
]
|
|
|
|
typeCheckingMode = "standard"
|
|
reportShadowedImports = false
|
|
disableBytesTypePromotions = true
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "session"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|