default_language_version:
  python: python3.12
exclude: ^.*\b(migrations)\b.*$
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: check-ast
      - id: check-merge-conflict
      - id: check-case-conflict
      - id: detect-private-key
      - id: check-added-large-files
      - id: check-json
      - id: check-symlinks
      - id: check-toml
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: 'v0.3.0'
    hooks:
      - id: ruff
        args:
          - --fix
      - id: ruff-format
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.15.1
    hooks:
      - id: pyupgrade
        args:
          - --py311-plus
        exclude: migrations/
  - repo: https://github.com/adamchainz/django-upgrade
    rev: 1.16.0
    hooks:
      - id: django-upgrade
        args:
          - --target-version=5.0
