repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-toml
      - id: check-yaml
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.15.2
    hooks:
      - id: pyupgrade
        args: [--py310-plus]
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.6.9
    hooks:
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix]
      - id: ruff-format
  - repo: local
    hooks:
      - id: mypy-local
        name: mypy (local)
        entry: python -m mypy -p py_ipfs_lite
        language: system
        types: [python]
        require_serial: true
        pass_filenames: false
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.17
    hooks:
      - id: mdformat
        additional_dependencies:
          - mdformat-gfm
  - repo: local
    hooks:
      - id: check-rst-files
        name: check rst files
        entry: python scripts/check_rst.py
        language: system
        types: [text]
        pass_filenames: false
      - id: path-audit
        name: path audit
        entry: python scripts/audit_paths.py
        language: system
        types: [python]
        pass_filenames: false
