exclude: ^tests/data
repos:
  - repo: local
    hooks:
      - id: generate-stubs
        name: generate-stubs
        entry: uv run python stubs/scripts/generate_stubs.py
        language: system
        pass_filenames: false
        files: ^src/aioiregul/.*\.py$
      - id: pyright
        name: pyright
        entry: .venv/bin/pyright
        language: system
        types_or: [python]
        pass_filenames: false
        args: ["--project", "pyproject.toml"]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.3.0
    hooks:
      - id: check-added-large-files
      - id: check-yaml
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.6.4
    hooks:
      # Run the linter.
      - id: ruff
        args: [--fix]
      # Run the formatter.
      - id: ruff-format
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.2.1
    hooks:
      - id: prettier
