.pre-commit-config.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. repos:
  2. - repo: https://github.com/PyCQA/flake8
  3. rev: 5.0.4
  4. hooks:
  5. - id: flake8
  6. args: ["--max-line-length=120", "--ignore=E131,E125,W503,W504,E203"]
  7. - repo: https://github.com/PyCQA/isort
  8. rev: 5.11.5
  9. hooks:
  10. - id: isort
  11. - repo: https://github.com/pre-commit/mirrors-yapf
  12. rev: v0.32.0
  13. hooks:
  14. - id: yapf
  15. args: ["--style={based_on_style: google, column_limit: 120, indent_width: 4}"]
  16. - repo: https://github.com/codespell-project/codespell
  17. rev: v2.2.1
  18. hooks:
  19. - id: codespell
  20. - repo: https://github.com/pre-commit/pre-commit-hooks
  21. rev: v4.3.0
  22. hooks:
  23. - id: trailing-whitespace
  24. - id: check-yaml
  25. - id: end-of-file-fixer
  26. - id: requirements-txt-fixer
  27. - id: double-quote-string-fixer
  28. - id: check-merge-conflict
  29. - id: fix-encoding-pragma
  30. args: ["--remove"]
  31. - id: mixed-line-ending
  32. args: ["--fix=lf"]
  33. - repo: https://github.com/executablebooks/mdformat
  34. rev: 0.7.9
  35. hooks:
  36. - id: mdformat
  37. args: ["--number", "--table-width", "200"]
  38. additional_dependencies:
  39. - mdformat-openmmlab
  40. - mdformat_frontmatter
  41. - linkify-it-py
  42. - repo: https://github.com/myint/docformatter
  43. rev: v1.3.1
  44. hooks:
  45. - id: docformatter
  46. args: ["--in-place", "--wrap-descriptions", "119"]