.pre-commit-config.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. fail_fast: true
  2. #exclude: '^exclude'
  3. repos:
  4. - repo: https://github.com/psf/black
  5. rev: 24.10.0
  6. hooks:
  7. - id: black
  8. language_version: python3.8
  9. - repo: local
  10. hooks:
  11. - id: pytest-check
  12. name: pytest-check
  13. entry: pytest
  14. language: system
  15. pass_filenames: false
  16. always_run: true
  17. - repo: local
  18. hooks:
  19. - id: flake8-check1 # stop the build if there are Python syntax errors or undefined names
  20. name: flake8-check1
  21. entry: flake8 draugr --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=*exclude*
  22. language: system
  23. pass_filenames: false
  24. always_run: true
  25. - repo: local
  26. hooks:
  27. - id: flake8-check2 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  28. name: flake8-check2
  29. entry: flake8 draugr --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=*exclude*
  30. language: system
  31. pass_filenames: false
  32. always_run: true
  33. # - repo: local
  34. # hooks:
  35. # - id: sphinx-check
  36. # name: sphinx-check
  37. # entry: docs/make.sh
  38. # language: script
  39. # types: [ python ]
  40. # pass_filenames: false