.pre-commit-config.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. repos:
  2. # flake8
  3. - repo: https://github.com/PyCQA/flake8
  4. rev: 3.8.3
  5. hooks:
  6. - id: flake8
  7. args: ["--config=setup.cfg", "--ignore=W504, W503"]
  8. # modify known_third_party
  9. - repo: https://github.com/asottile/seed-isort-config
  10. rev: v2.2.0
  11. hooks:
  12. - id: seed-isort-config
  13. # isort
  14. - repo: https://github.com/timothycrosley/isort
  15. rev: 5.2.2
  16. hooks:
  17. - id: isort
  18. # yapf
  19. - repo: https://github.com/pre-commit/mirrors-yapf
  20. rev: v0.30.0
  21. hooks:
  22. - id: yapf
  23. # codespell
  24. - repo: https://github.com/codespell-project/codespell
  25. rev: v2.1.0
  26. hooks:
  27. - id: codespell
  28. # pre-commit-hooks
  29. - repo: https://github.com/pre-commit/pre-commit-hooks
  30. rev: v3.2.0
  31. hooks:
  32. - id: trailing-whitespace # Trim trailing whitespace
  33. - id: check-yaml # Attempt to load all yaml files to verify syntax
  34. - id: check-merge-conflict # Check for files that contain merge conflict strings
  35. - id: double-quote-string-fixer # Replace double quoted strings with single quoted strings
  36. - id: end-of-file-fixer # Make sure files end in a newline and only a newline
  37. - id: requirements-txt-fixer # Sort entries in requirements.txt and remove incorrect entry for pkg-resources==0.0.0
  38. - id: fix-encoding-pragma # Remove the coding pragma: # -*- coding: utf-8 -*-
  39. args: ["--remove"]
  40. - id: mixed-line-ending # Replace or check mixed line ending
  41. args: ["--fix=lf"]