Files
Auto_Bangumi/backend/pyproject.toml
Estrella Pan b129c4437a chore(release): 准备 4.0.0
- 部署文档、升级指南与 README 改为正式版说法:latest = 4.0,3.3 固定为 3.3.7
- docs/changelog/4.0.md 新增 4.0.0 汇总(升级前必读、破坏性变更、新功能、主要修复),链接改为绝对地址
- 文档站与插件市场改为从 main 发布,插件上架 PR 的目标分支改为 main
- 文档站页脚版本 v4.0.0;en/ja README 的 star history 地址
2026-10-24 11:46:50 +02:00

114 lines
3.0 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[project]
name = "auto-bangumi"
version = "4.0.0"
description = "AutoBangumi - Automated anime download manager"
requires-python = ">=3.14"
dependencies = [
"fastapi>=0.150.0",
"uvicorn>=0.54",
"httpx2[socks]>=2.15",
"beautifulsoup4>=4.15.0",
"sqlmodel>=0.0.48",
"sqlalchemy[aiosqlite]>=2.1.5",
"pydantic>=2.14.1",
"bcrypt>=4.1",
"cryptography>=50.0.2",
"python-multipart>=0.0.30",
"python-dotenv>=1.2.4",
"Jinja2>=3.1.2",
"openai>=3.35.1",
"semver>=3.1.0",
"webauthn>=2.8.0",
"mcp>=2.3.0",
"anthropic>=1.15.0",
"google-genai>=2.31.0",
"packaging>=26.3",
"jsonschema>=4.20.0",
]
[dependency-groups]
dev = [
"pytest>=9.1.1",
"pytest-asyncio>=1.4.0",
"pytest-mock>=3.17.0",
"ruff>=0.17.1",
"mypy>=2.4.0",
"vulture>=2.16",
# ab-plugin 命令行与 ab_sdk 轮子的打包配置(sdk/),可编辑安装,源码仍在 src/ab_sdk
"autobangumi-sdk",
]
[tool.pytest.ini_options]
testpaths = ["src/test"]
pythonpath = ["src"]
asyncio_mode = "auto"
markers = [
"e2e: End-to-end integration tests (require Docker)",
]
[tool.ruff]
line-length = 88
target-version = "py314"
exclude = [".venv", "venv", "build", "dist"]
[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["E501", "F401"]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.uv]
package = false
[tool.uv.sources]
autobangumi-sdk = { path = "sdk", editable = true }
[tool.mypy]
python_version = "3.14"
# 非严格基线:先打开对未标注函数体的检查(能捕获协程未 await 等真实 bug),
# 暂不强制所有函数都标注类型。
check_untyped_defs = true
disallow_untyped_defs = false
# module.__version__ 是构建期生成的文件,仓库中不存在(见 module/conf/config.py 的 try/except)
[[tool.mypy.overrides]]
module = "module.__version__"
ignore_missing_imports = true
# aiohttp 仅用于 e2e mock server(在独立 Docker 容器中安装,不在本项目依赖中)
[[tool.mypy.overrides]]
module = "aiohttp"
ignore_missing_imports = true
# jsonschema 不带类型信息(无 py.typed)
[[tool.mypy.overrides]]
module = "jsonschema"
ignore_missing_imports = true
# 测试代码惯用 `obj.method = AsyncMock()` 直接打桩实例方法,这是标准、安全的
# unittest.mock 用法,但 mypy 默认禁止给方法赋值。只关闭这一条错误码,
# attr-defined 等其余检查(含真实 bug)在测试代码中保持开启。
[[tool.mypy.overrides]]
module = "test.*"
disable_error_code = ["method-assign"]
[tool.vulture]
# 死代码检查:新的未使用函数/类/方法会让 CI 失败。框架通过装饰器注册的入口
# (路由、校验器等)由 ignore_decorators 排除;仅测试使用的辅助方法和 pydantic
# 字段等误报登记在 vulture_whitelist.py。
paths = ["src/module", "src/main.py", "vulture_whitelist.py"]
min_confidence = 60
ignore_decorators = [
"@router.*",
"@*_router.*",
"@model_validator",
"@field_validator",
"@property",
"@app.*",
"@server.*",
"@mcp.*",
]