strat-gameplay-webapp/backend/pyproject.toml
Cal Corum a4b99ee53e CLAUDE: Replace black and flake8 with ruff for formatting and linting
Migrated to ruff for faster, modern code formatting and linting:

Configuration changes:
- pyproject.toml: Added ruff 0.8.6, removed black/flake8
- Configured ruff with black-compatible formatting (88 chars)
- Enabled comprehensive linting rules (pycodestyle, pyflakes, isort,
  pyupgrade, bugbear, comprehensions, simplify, return)
- Updated CLAUDE.md: Changed code quality commands to use ruff

Code improvements (490 auto-fixes):
- Modernized type hints: List[T] → list[T], Dict[K,V] → dict[K,V],
  Optional[T] → T | None
- Sorted all imports (isort integration)
- Removed unused imports
- Fixed whitespace issues
- Reformatted 38 files for consistency

Bug fixes:
- app/core/play_resolver.py: Fixed type hint bug (any → Any)
- tests/unit/core/test_runner_advancement.py: Removed obsolete random mock

Testing:
- All 739 unit tests passing (100%)
- No regressions introduced

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 15:33:21 -06:00

92 lines
2.0 KiB
TOML

[project]
name = "strat-gameplay-backend"
version = "0.1.0"
description = "Strat Real-Time Game Engine Backend - FastAPI with WebSocket support"
readme = "README.md"
requires-python = ">=3.13"
authors = [
{ name = "Cal Corum" }
]
dependencies = [
"aiofiles==24.1.0",
"alembic==1.14.0",
"asyncpg==0.30.0",
"click==8.1.8",
"fastapi==0.115.6",
"greenlet==3.2.4",
"httpx==0.28.1",
"passlib[bcrypt]==1.7.4",
"pendulum==3.0.0",
"psycopg2-binary==2.9.10",
"pydantic==2.10.6",
"pydantic-settings==2.7.1",
"python-dotenv==1.0.1",
"python-jose[cryptography]==3.3.0",
"python-multipart==0.0.20",
"python-socketio==5.11.4",
"redis==5.2.1",
"rich==13.9.4",
"sqlalchemy==2.0.36",
"uvicorn[standard]==0.34.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["app"]
[dependency-groups]
dev = [
"mypy==1.14.1",
"pytest==8.3.4",
"pytest-asyncio==0.25.2",
"pytest-cov==6.0.0",
"ruff==0.8.6",
]
[tool.ruff]
line-length = 88
target-version = "py313"
exclude = [
".git",
".venv",
"__pycache__",
"*.pyc",
".pytest_cache",
".mypy_cache",
".ruff_cache",
"logs",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RET", # flake8-return
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults (FastAPI Depends)
"RET504", # unnecessary variable assignment before return
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"N802", # function name should be lowercase (test_X pattern is fine)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"