Skip to main content
Run formatting and validation before pushing changes to ensure code quality.

Format

Format the codebase using ruff:
./scripts/format.sh

Validate

Lint and type-check using ruff and mypy:
./scripts/validate.sh
Configuration is in pyproject.toml. Run both scripts before every commit.

Pre-commit Workflow

# 1. Format
./scripts/format.sh

# 2. Validate
./scripts/validate.sh

# 3. If both pass, commit
git add .
git commit -m "your message"

Common Issues

IssueSolution
ruff not foundRun uv pip install ruff
mypy not foundRun uv pip install mypy
Type errorsFix the types or add # type: ignore comment
Import sortingRun ruff check --fix . to auto-fix