Files
nuzlocke-tracker/backend/pyproject.toml
Julian Tabel 8cfa074ea6 Migrate pre-commit hooks from pre-commit to prek
Replace the Python-based pre-commit framework with prek (Rust) for
faster hook execution. Convert .pre-commit-config.yaml to prek.toml,
remove pre-commit from dev dependencies, and apply ruff auto-fixes
(UP037: remove unnecessary string quotes in type annotations).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:17:23 +01:00

70 lines
1.4 KiB
TOML

[project]
name = "nuzlocke-tracker-api"
version = "0.1.0"
description = "Backend API for Nuzlocke Tracker"
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"fastapi==0.128.4",
"uvicorn[standard]==0.40.0",
"pydantic==2.12.5",
"pydantic-settings==2.12.0",
"python-dotenv==1.2.1",
"sqlalchemy[asyncio]==2.0.46",
"asyncpg==0.31.0",
"alembic==1.18.3",
]
[project.optional-dependencies]
dev = [
"ruff==0.15.0",
"ty==0.0.17",
"pytest==9.0.2",
"pytest-asyncio==1.3.0",
"httpx==0.28.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/app"]
[tool.ruff]
target-version = "py314"
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.ty.environment]
python-version = "3.14"
[tool.ty.src]
root = "src"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]