# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '(data/|documentation/|portprotonqt/locales/|dev-scripts/|\.venv/|venv/|.*\.svg$)'
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-toml
      - id: check-yaml

  - repo: https://github.com/astral-sh/uv-pre-commit
    rev: 0.6.14
    hooks:
      - id: uv-lock

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.11.5
    hooks:
      - id: ruff
        args: [--fix]

  - repo: local
    hooks:
      - id: pyright
        name: pyright
        entry: pyright
        language: system
        'types_or': [python, pyi]
        require_serial: true

  - repo: local
    hooks:
      - id: check-qss-properties
        name: Check theme for invalid QSS properties
        entry: ./dev-scripts/check_qss_properties.py
        language: system
        types: [file]
        files: \.py$
        pass_filenames: false