fail_fast: true
#exclude: '^exclude'
repos:
  - repo: https://github.com/psf/black
    rev: 24.10.0
    hooks:
      - id: black
        language_version: python3.8
  - repo: local
    hooks:
      - id: pytest-check
        name: pytest-check
        entry: pytest
        language: system
        pass_filenames: false
        always_run: true
  - repo: local
    hooks:
      - id: flake8-check1 # stop the build if there are Python syntax errors or undefined names
        name: flake8-check1
        entry: flake8 draugr --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=*exclude*
        language: system
        pass_filenames: false
        always_run: true
  - repo: local
    hooks:
      - id: flake8-check2  # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
        name: flake8-check2
        entry: flake8 draugr --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=*exclude*
        language: system
        pass_filenames: false
        always_run: true
#  - repo: local
#    hooks:
#      - id: sphinx-check
#        name: sphinx-check
#        entry: docs/make.sh
#        language: script
#        types: [ python ]
#        pass_filenames: false
