Files

40 lines
1.3 KiB
TOML
Raw Permalink Normal View History

# FileCodeBox tooling config.
# Application repo (not a library): no [project] packaging metadata here, and
# requirements.txt remains the single source of runtime deps. This file only
# holds tool configs plus the dev dependency group (PEP 735, `uv sync --group dev`).
[tool.pytest.ini_options]
testpaths = ["tests"]
# Tests import top-level packages (core/apps) directly; put the repo root on
# sys.path so bare `pytest` collects without `python -m pytest`.
pythonpath = ["."]
# Async tests/fixtures without per-test decorators.
asyncio_mode = "auto"
[dependency-groups]
dev = [
"pytest",
"pytest-asyncio",
"httpx",
"ruff",
"pre-commit",
2026-09-20 02:01:08 +08:00
"moto[s3,server]",
"mypy",
]
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
# Core correctness rules only for now (same families as ruff defaults):
# E4/E7/E9 = syntax/indent errors and unused variables; F = pyflakes
# (unused imports, undefined names). Style families (pyupgrade, broad-except,
# import sorting) are deferred to keep the initial diff minimal.
select = ["E4", "E7", "E9", "F"]
2026-09-20 02:01:08 +08:00
[tool.mypy]
python_version = "3.12"
# 渐进引入:基线棘轮模式(scripts/mypy-ratchet.py)——只许修复减少、不许新增。
# 修掉基线里的错误后跑 `--regenerate` 收紧基线。
ignore_missing_imports = true