.pre-commit-config.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. exclude: ^tools/utils/
  2. repos:
  3. - repo: https://github.com/PyCQA/flake8
  4. rev: 5.0.4
  5. hooks:
  6. - id: flake8
  7. args: ["--max-line-length=150", "--ignore=E303,E731,W191,W504,E402,E722,E501,E203,E741,E265,E262,E126", "--exclude=__init__.py"]
  8. - repo: https://github.com/pre-commit/mirrors-yapf
  9. rev: v0.32.0
  10. hooks:
  11. - id: yapf
  12. - repo: https://github.com/pre-commit/pre-commit-hooks
  13. rev: v4.3.0
  14. hooks:
  15. - id: trailing-whitespace
  16. exclude: |
  17. (?x)^(
  18. dicts/|
  19. projects/.*?/dicts/
  20. )
  21. - id: check-yaml
  22. - id: end-of-file-fixer
  23. exclude: |
  24. (?x)^(
  25. dicts/|
  26. projects/.*?/dicts/
  27. )
  28. - id: requirements-txt-fixer
  29. - id: double-quote-string-fixer
  30. - id: check-merge-conflict
  31. - id: fix-encoding-pragma
  32. args: ["--remove"]
  33. - id: mixed-line-ending
  34. args: ["--fix=lf"]
  35. - id: mixed-line-ending
  36. args: ["--fix=lf"]
  37. - repo: https://github.com/executablebooks/mdformat
  38. rev: 0.7.9
  39. hooks:
  40. - id: mdformat
  41. args: ["--number", "--table-width", "200"]
  42. additional_dependencies:
  43. - mdformat-openmmlab
  44. - mdformat_frontmatter
  45. - linkify-it-py