Run ruff and ty to lint and type check the FastAPI backend project. Use this when the user requests to check the backend code quality or type safety.
This skill allows you to maintain the quality and type safety of the FastAPI backend project using Astral's high-performance tools: ruff and ty.
The FastAPI project must be managed by uv and have ruff and ty defined in the dev dependencies.
Navigate to the FastAPI backend directory.
cd backend/fastapi
Run ruff to identify linting issues and potential code quality improvements.
uv run ruff check .
To automatically fix issues that can be resolved without human intervention:
uv run ruff check --fix .
Run ty to perform high-speed static type checking across the entire backend codebase.
uv run ty check .
ruff covers linting and formatting, while ty covers static type analysis. Both should be used for full coverage.