# See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: # General file checks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace exclude: ^(tests/fixtures/|docs/) - id: end-of-file-fixer exclude: ^(tests/fixtures/|docs/) - id: check-yaml - id: check-added-large-files args: ['--maxkb=1000'] - id: check-json - id: check-toml - id: check-merge-conflict - id: debug-statements - id: mixed-line-ending # Ruff - Python linter and formatter - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.8.6 hooks: # Run the linter - id: ruff args: [--fix, --exit-non-zero-on-fix] files: ^(src/|tests/) # Run the formatter - id: ruff-format files: ^(src/|tests/) # MyPy - Type checking - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.8.0 hooks: - id: mypy additional_dependencies: - pydantic>=2.0.0 - pydantic-settings>=2.0.0 - types-python-jose - types-passlib args: [--strict, --ignore-missing-imports] files: ^src/ exclude: ^(tests/|scripts/) # Commit message validation - repo: https://github.com/commitizen-tools/commitizen rev: v3.13.0 hooks: - id: commitizen stages: [commit-msg] # Security checks - repo: https://github.com/Yelp/detect-secrets rev: v1.4.0 hooks: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] exclude: ^(tests/|docs/|\.env\.example)