default_stages:
  - commit
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.3.0
    hooks:
      - id: check-added-large-files
      - id: check-case-conflict
      - id: check-docstring-first
      - id: check-executables-have-shebangs
      - id: check-shebang-scripts-are-executable
      - id: check-symlinks
      - id: check-yaml
        exclude: pipeline/(Setup|TemplatePipeline)\.(json|yml|yaml)$
      - id: debug-statements
      - id: destroyed-symlinks
      - id: detect-aws-credentials
        args:
          - --allow-missing-credentials
      - id: detect-private-key
      - id: end-of-file-fixer
      - id: name-tests-test
        args:
          - --pytest-test-first
        exclude: tests/helpers/
      - id: no-commit-to-branch
      - id: requirements-txt-fixer
      - id: trailing-whitespace
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.14
    hooks:
      - id: mdformat
        additional_dependencies:
          - mdformat-gfm
          - mdformat-black
  # - repo: https://github.com/adrienverge/yamllint
  #   rev: v1.27.1
  #   hooks:
  #     - id: yamllint
  #       args:
  #         - --format
  #         - parsable
  #         - --strict
  # - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
  #   rev: 0.2.2
  #   hooks:
  #     - id: yamlfmt
  #       args:
  #         - --mapping
  #         - '2'
  #         - --sequence
  #         - '4'
  #         - --offset
  #         - '2'
  #         - --implicit_start
  # - repo: https://github.com/kynan/nbstripout
  #   rev: 0.6.0
  #   hooks:
  #     - id: nbstripout
  #       args:
  #         - --drop-empty-cells
  # - repo: https://github.com/shellcheck-py/shellcheck-py
  #   rev: v0.8.0.4
  #   hooks:
  #     - id: shellcheck
  - repo: https://github.com/jorisroovers/gitlint
    rev: v0.17.0
    hooks:
      - id: gitlint
  - repo: https://github.com/psf/black
    rev: 22.6.0
    hooks:
      - id: black
        language_version: python3
      # - id: black-jupyter
        # language_version: python3
  - repo: https://github.com/asottile/blacken-docs
    rev: v1.12.1
    hooks:
      - id: blacken-docs
  - repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
      - id: isort
        args: [--profile, black]
  - repo: https://github.com/PyCQA/docformatter
    rev: v1.4
    hooks:
      - id: docformatter
        args:
          - --in-place
          - --wrap-summaries
          - '88'
          - --wrap-descriptions
          - '81'
  - repo: https://github.com/PyCQA/flake8
    rev: 4.0.1
    hooks:
      - id: flake8
        additional_dependencies:
          - flake8-use-pathlib
          - flake8-bugbear
          - flake8-pytest-style
          - flake8-comprehensions
  - repo: https://github.com/PyCQA/pylint
    rev: v2.14.5
    hooks:
      - id: pylint
  - repo: https://github.com/asottile/pyupgrade
    rev: v2.37.3
    hooks:
      - id: pyupgrade
        args:
          - --py38-plus
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.971
    hooks:
      - id: mypy
        args:
          - --python-version
          - '3.8'
  - repo: https://github.com/asottile/yesqa
    rev: v1.3.0
    hooks:
      - id: yesqa
  # - repo: https://github.com/s-weigand/flake8-nb
  #   rev: v0.4.0
  #   hooks:
  #     - id: flake8-nb
  #       args:
  #         - --config
  #         - .flake8
  #       additional_dependencies:
  #         - flake8-use-pathlib
  #         - flake8-bugbear
  #         - flake8-pytest-style
  #         - flake8-comprehensions

  - repo: https://github.com/timothycrosley/isort
    rev: 5.7.0
    hooks:
    - id: isort
  - repo: https://github.com/econchick/interrogate
    rev: 1.4.0  
    hooks:
    - id: interrogate
      args: [-vv, -i, --fail-under=80]