- Use Ruff as the Python linter and formatter. Configure in `pyproject.toml` under `[tool.ruff]`.
- Run `ruff check --fix .` for linting, `ruff format .` for formatting.
- Configure `[tool.ruff]` in `pyproject.toml` — enable rule sets `E`, `F`, `I` (isort), `UP` (pyupgrade), `B` (bugbear) at minimum.
- Enable rule sets: `select = ["E", "W", "F", "I", "N", "UP", "B", "SIM", "TCH"]` for comprehensive coverage.
- Use `ruff check .` in CI without `--fix`. Use `ruff format --check .` to verify formatting.
- Configure `target-version = "py312"` to match your project's minimum Python version.
- Use `per-file-ignores` for relaxed rules on specific paths: `"tests/*" = ["S101"]` (allow assert in tests).