.pre-commit-config.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. repos:
  2. - repo: https://github.com/PyCQA/flake8
  3. rev: 5.0.4
  4. hooks:
  5. - id: flake8
  6. - repo: https://github.com/PyCQA/isort
  7. rev: 5.11.5
  8. hooks:
  9. - id: isort
  10. - repo: https://github.com/pre-commit/mirrors-yapf
  11. rev: v0.32.0
  12. hooks:
  13. - id: yapf
  14. - repo: https://github.com/pre-commit/pre-commit-hooks
  15. rev: v4.3.0
  16. hooks:
  17. - id: trailing-whitespace
  18. - id: check-yaml
  19. - id: end-of-file-fixer
  20. - id: requirements-txt-fixer
  21. - id: double-quote-string-fixer
  22. - id: check-merge-conflict
  23. - id: fix-encoding-pragma
  24. args: ["--remove"]
  25. - id: mixed-line-ending
  26. args: ["--fix=lf"]
  27. - repo: https://github.com/codespell-project/codespell
  28. rev: v2.2.1
  29. hooks:
  30. - id: codespell
  31. - repo: https://github.com/executablebooks/mdformat
  32. rev: 0.7.9
  33. hooks:
  34. - id: mdformat
  35. args: ["--number"]
  36. additional_dependencies:
  37. - mdformat-openmmlab
  38. - mdformat_frontmatter
  39. - linkify-it-py
  40. - repo: https://github.com/myint/docformatter
  41. rev: v1.3.1
  42. hooks:
  43. - id: docformatter
  44. args: ["--in-place", "--wrap-descriptions", "79"]
  45. - repo: https://github.com/open-mmlab/pre-commit-hooks
  46. rev: v0.2.0 # Use the ref you want to point at
  47. hooks:
  48. - id: check-algo-readme
  49. - id: check-copyright
  50. args: ["mmdet"] # replace the dir_to_check with your expected directory to check