.pre-commit-config.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. exclude: ^data/.*$
  2. ci:
  3. autoupdate_commit_msg: "build(pre-commit): update hooks"
  4. autofix_commit_msg: "style: pre-commit fixes"
  5. repos:
  6. - repo: https://github.com/pre-commit/pre-commit-hooks
  7. rev: v4.6.0
  8. hooks:
  9. - id: check-added-large-files
  10. - id: check-case-conflict
  11. - id: check-docstring-first
  12. - id: check-executables-have-shebangs
  13. - id: check-shebang-scripts-are-executable
  14. - id: check-merge-conflict
  15. - id: destroyed-symlinks
  16. - id: check-yaml
  17. - id: check-toml
  18. - id: debug-statements
  19. - id: end-of-file-fixer
  20. - id: mixed-line-ending
  21. - id: name-tests-test
  22. args: [--pytest-test-first]
  23. - id: requirements-txt-fixer
  24. - id: detect-private-key
  25. - id: trailing-whitespace
  26. - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
  27. rev: v2.13.0
  28. hooks:
  29. - id: pretty-format-ini
  30. args: [--autofix]
  31. - id: pretty-format-toml
  32. args: [--autofix]
  33. - repo: https://github.com/astral-sh/ruff-pre-commit
  34. rev: v0.5.0
  35. hooks:
  36. - id: ruff
  37. types_or: [python, pyi, jupyter]
  38. args: [--fix]
  39. # Run the formatter.
  40. - id: ruff-format
  41. types_or: [python, pyi, jupyter]
  42. - repo: https://github.com/pre-commit/mirrors-prettier
  43. rev: v4.0.0-alpha.8
  44. hooks:
  45. - id: prettier
  46. files: \.(yaml|yml|md|html|css|scss|js|json)$
  47. args: [--prose-wrap=preserve]
  48. - repo: https://github.com/pre-commit/pygrep-hooks
  49. rev: v1.10.0
  50. hooks:
  51. - id: python-use-type-annotations
  52. - id: rst-backticks
  53. - id: rst-directive-colons
  54. - id: rst-inline-touching-normal
  55. # should be replaced in the future ref https://github.com/astral-sh/ruff/issues/458
  56. - repo: https://github.com/jsh9/pydoclint
  57. rev: 0.5.3
  58. hooks:
  59. - id: pydoclint
  60. - repo: https://github.com/codespell-project/codespell
  61. rev: v2.3.0
  62. hooks:
  63. - id: codespell
  64. additional_dependencies:
  65. - tomli
  66. - repo: https://github.com/shellcheck-py/shellcheck-py
  67. rev: v0.10.0.1
  68. hooks:
  69. - id: shellcheck
  70. args: [-x]
  71. - repo: https://github.com/commitizen-tools/commitizen
  72. rev: v3.27.0
  73. hooks:
  74. - id: commitizen