.pre-commit-config.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. fail_fast: true
  2. repos:
  3. - repo: https://github.com/charliermarsh/ruff-pre-commit
  4. rev: v0.8.2
  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. description: 'Update pyi files as needed'
  24. entry: python3 scripts/make_pyi.py
  25. - repo: https://github.com/RobertCraigie/pyright-python
  26. rev: v1.1.313
  27. hooks:
  28. - id: pyright
  29. args: [reflex, tests]
  30. language: system
  31. - repo: https://github.com/terrencepreilly/darglint
  32. rev: v1.8.1
  33. hooks:
  34. - id: darglint
  35. exclude: '^reflex/reflex.py'