The project enforces code quality with Ruff (linting + formatting), mypy (strict type checking), and pre-commit hooks.
- Ruff: Fast Python linter and formatter, replaces Flake8, isort, Black.
- mypy: Static type checker in strict mode.
- pre-commit: Runs checks automatically before each commit.
pyproject.tomlcontains[tool.ruff]and[tool.mypy]sections..pre-commit-config.yamldefines the hooks.
# Lint and auto-fix
ruff check --fix .
ruff format .
# Type check
mypy app/
# Run all pre-commit hooks
pre-commit run --all-filespre-commit installAfter this, every git commit will trigger linting and formatting checks.
All code must have complete type hints. mypy runs in strict mode. External libraries without stubs are excluded via ignore_missing_imports.
GitHub Actions run these checks on every push (see CI/CD phase).