.pre-commit-config.yaml 935 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. exclude: 'build|stubs'
  2. default_language_version:
  3. python: python3
  4. repos:
  5. - repo: https://github.com/pre-commit/pre-commit-hooks
  6. rev: v4.1.0
  7. hooks:
  8. - id: trailing-whitespace
  9. - id: check-ast
  10. - id: check-merge-conflict
  11. - id: no-commit-to-branch
  12. args: ['--branch=master']
  13. - id: check-added-large-files
  14. args: ['--maxkb=500']
  15. - id: end-of-file-fixer
  16. - repo: https://github.com/ambv/black
  17. rev: 22.3.0
  18. hooks:
  19. - id: black
  20. language_version: python3.8
  21. - repo: https://gitlab.com/pycqa/flake8
  22. rev: 3.9.2
  23. hooks:
  24. - id: flake8
  25. args: [
  26. # only error for syntax errors and undefined names
  27. "--select=E9,F63,F7,F82",
  28. ]
  29. - repo: https://github.com/pycqa/isort
  30. rev: 5.10.1
  31. hooks:
  32. - id: isort
  33. exclude: README.md
  34. additional_dependencies: [toml]
  35. args: ["--profile", "black"]