1
0

.pre-commit-config.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # See https://pre-commit.com for more information
  2. # See https://pre-commit.com/hooks.html for more hooks
  3. exclude: "CHANGELOG.md"
  4. default_stages: [pre-commit]
  5. ci:
  6. autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
  7. autoupdate_commit_msg: "chore(pre-commit.ci): pre-commit autoupdate"
  8. repos:
  9. - repo: https://github.com/commitizen-tools/commitizen
  10. rev: v4.1.0
  11. hooks:
  12. - id: commitizen
  13. stages: [commit-msg]
  14. - repo: https://github.com/pre-commit/pre-commit-hooks
  15. rev: v5.0.0
  16. hooks:
  17. - id: debug-statements
  18. - id: check-builtin-literals
  19. - id: check-case-conflict
  20. - id: check-docstring-first
  21. - id: check-json
  22. - id: check-toml
  23. - id: check-xml
  24. - id: check-yaml
  25. - id: detect-private-key
  26. - id: end-of-file-fixer
  27. - id: trailing-whitespace
  28. - id: debug-statements
  29. - repo: https://github.com/pre-commit/mirrors-prettier
  30. rev: v4.0.0-alpha.8
  31. hooks:
  32. - id: prettier
  33. - repo: https://github.com/asottile/pyupgrade
  34. rev: v3.19.1
  35. hooks:
  36. - id: pyupgrade
  37. args: [--py311-plus]
  38. - repo: https://github.com/astral-sh/ruff-pre-commit
  39. rev: v0.8.4
  40. hooks:
  41. - id: ruff
  42. args: [--fix]
  43. - id: ruff-format
  44. - repo: https://github.com/cdce8p/python-typing-update
  45. rev: v0.7.0
  46. hooks:
  47. - id: python-typing-update
  48. stages: [manual]
  49. args:
  50. - --py311-plus
  51. - --force
  52. - --keep-updates
  53. files: ^(switchbot)/.+\.py$
  54. - repo: https://github.com/codespell-project/codespell
  55. rev: v2.3.0
  56. hooks:
  57. - id: codespell