default_language_version:
  python: python3.11

exclude: .*migrations\/.*|static\/img\/.*|static\/animations\/.*|kube\/boost\/templates\/.*\.yaml

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: check-case-conflict
      - id: check-merge-conflict
      - id: check-yaml
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/ambv/black
    rev: 23.3.0
    hooks:
      - id: black
  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: v0.0.272
    hooks:
      - id: ruff
        args: [--fix]
  - repo: https://github.com/rtts/djhtml
    rev: 3.0.6
    hooks:
      - id: djhtml
        entry: djhtml --tabwidth 2
        files: .*/templates/.*\.html$
        alias: autoformat
  - repo: local
    hooks:
      - id: rustywind
        name: rustywind Tailwind CSS class linter
        language: node
        additional_dependencies:
          - rustywind@0.16.0
        entry: rustywind
        args: [ --write, templates ]
        types_or: [ html ]
