.pre-commit-config.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. fail_fast: true
  2. repos:
  3. - repo: https://github.com/astral-sh/ruff-pre-commit
  4. rev: v0.11.8
  5. hooks:
  6. - id: ruff-format
  7. args: [reflex, tests]
  8. - id: ruff
  9. args: ["--fix", "--exit-non-zero-on-fix"]
  10. exclude: "^integration/benchmarks/"
  11. - repo: https://github.com/codespell-project/codespell
  12. rev: v2.4.1
  13. hooks:
  14. - id: codespell
  15. args: ["reflex"]
  16. additional_dependencies:
  17. - tomli
  18. # Run pyi check before pyright because pyright can fail if pyi files are wrong.
  19. - repo: local
  20. hooks:
  21. - id: update-pyi-files
  22. name: update-pyi-files
  23. always_run: true
  24. language: system
  25. require_serial: true
  26. description: "Update pyi files as needed"
  27. entry: python3 scripts/make_pyi.py
  28. - repo: https://github.com/RobertCraigie/pyright-python
  29. rev: v1.1.400
  30. hooks:
  31. - id: pyright
  32. args: [reflex, tests]
  33. language: system
  34. - repo: https://github.com/terrencepreilly/darglint
  35. rev: v1.8.1
  36. hooks:
  37. - id: darglint
  38. exclude: "^reflex/reflex.py"
  39. - repo: https://github.com/pre-commit/mirrors-prettier
  40. rev: f62a70a3a7114896b062de517d72829ea1c884b6
  41. hooks:
  42. - id: prettier
  43. require_serial: true