repos:
  - repo: https://github.com/Narsil/pre-commit-rust
    rev: 0c016cee78144d06d906fccc7715d607a946ca5c
    hooks:
      - id: fmt
        name: "Rust (fmt)"
        args: ["--manifest-path", "safetensors/Cargo.toml", "--"]
      - id: clippy
        name: "Rust (clippy)"
        args:
          [
            "--manifest-path",
            "safetensors/Cargo.toml",
            "--all-targets",
            "--",
            "-Dwarnings",
          ]
  - repo: https://github.com/Narsil/pre-commit-rust
    rev: 0c016cee78144d06d906fccc7715d607a946ca5c
    hooks:
      - id: fmt
        name: "Python (fmt)"
        args: ["--manifest-path", "bindings/python/Cargo.toml", "--"]
      - id: clippy
        name: "Python (clippy)"
        args:
          [
            "--manifest-path",
            "bindings/python/Cargo.toml",
            "--all-targets",
            "--",
            "-Dwarnings",
          ]
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.12.8
    hooks:
      # Run the linter.
      - id: ruff-check
      # Run the formatter.
      - id: ruff-format
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.11.11
    hooks:
      # Run the linter.
      - id: ruff-check
      # Run the formatter.
      - id: ruff-format
