.pre-commit-config.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. fail_fast: true
  2. repos:
  3. - repo: https://github.com/charliermarsh/ruff-pre-commit
  4. rev: v0.9.10
  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.3.0
  13. hooks:
  14. - id: codespell
  15. args: ["reflex"]
  16. # Run pyi check before pyright because pyright can fail if pyi files are wrong.
  17. - repo: local
  18. hooks:
  19. - id: update-pyi-files
  20. name: update-pyi-files
  21. always_run: true
  22. language: system
  23. require_serial: true
  24. description: "Update pyi files as needed"
  25. entry: python3 scripts/make_pyi.py
  26. - repo: https://github.com/RobertCraigie/pyright-python
  27. rev: v1.1.394
  28. hooks:
  29. - id: pyright
  30. args: [reflex, tests]
  31. language: system
  32. - repo: https://github.com/terrencepreilly/darglint
  33. rev: v1.8.1
  34. hooks:
  35. - id: darglint
  36. exclude: "^reflex/reflex.py"
  37. - repo: https://github.com/pre-commit/mirrors-prettier
  38. rev: f62a70a3a7114896b062de517d72829ea1c884b6
  39. hooks:
  40. - id: prettier
  41. require_serial: true