# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# SPDX-FileContributor: Andre Anjos <andre.anjos@idiap.ch>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/numpy/numpydoc
    rev: v1.6.0
    hooks:
      - id: numpydoc-validation
  - repo: https://github.com/psf/black
    rev: 23.12.1
    hooks:
      - id: black
  - repo: https://github.com/pycqa/docformatter
    rev: v1.7.5
    hooks:
      - id: docformatter
        args: [
          --wrap-summaries=0,
      ]
  - repo: https://github.com/pycqa/isort
    rev: 5.13.2
    hooks:
      - id: isort
  - repo: https://github.com/pycqa/flake8
    rev: 7.0.0
    hooks:
      - id: flake8
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.8.0
    hooks:
    - id: mypy
      args: [
        --install-types,
        --non-interactive,
        --no-strict-optional,
        --ignore-missing-imports,
      ]
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.15.0
    hooks:
    - id: pyupgrade
      args: [--py39-plus]
  # - repo: https://github.com/pre-commit/mirrors-prettier
  #   rev: v2.7.1
  #   hooks:
  #   - id: prettier
  #     types_or: [json]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: check-ast
      - id: check-added-large-files
        exclude: |
          (?x)(
              ^src/ptbench/data/padchest/idiap.json.bz2|
              ^src/ptbench/data/padchest/no-tb-idiap.json.bz2|
              ^tests/data/16bits.png|
              ^doc/results/img/rad_sign_drop.png
              )
      - id: check-toml
      - id: check-json
      - id: check-yaml
        exclude: |
          (?x)(
              ^conda/meta.yaml|
              ^.gitlab-ci.yml
              )
      - id: debug-statements
      - id: check-case-conflict
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: debug-statements
  - repo: https://github.com/fsfe/reuse-tool
    rev: v3.0.1
    hooks:
      - id: reuse
