Backend: auto-fix and format all ruff issues, manually fix B904/B023/ SIM117/B007/E741/F841 errors, suppress B008 (FastAPI Depends) and F821 (SQLAlchemy forward refs) in config. Frontend: allow constant exports, disable React compiler-specific rules (set-state-in-effect, preserve-manual-memoization). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.3 KiB
TOML
62 lines
1.3 KiB
TOML
[project]
|
|
name = "nuzlocke-tracker-api"
|
|
version = "0.1.0"
|
|
description = "Backend API for Nuzlocke Tracker"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.34.0",
|
|
"pydantic>=2.10.0",
|
|
"pydantic-settings>=2.7.0",
|
|
"python-dotenv>=1.0.0",
|
|
"sqlalchemy[asyncio]>=2.0.0",
|
|
"asyncpg>=0.30.0",
|
|
"alembic>=1.14.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"ruff>=0.9.0",
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.25.0",
|
|
"httpx>=0.28.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/app"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 88
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # Pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
"SIM", # flake8-simplify
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"B008", # Depends() in defaults — standard FastAPI pattern
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"src/app/models/*.py" = ["F821"] # forward refs in SQLAlchemy relationships
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["app"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|