.pre-commit-config.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. repos:
  2. - repo: https://github.com/pre-commit/pre-commit-hooks
  3. rev: v4.0.1
  4. hooks:
  5. - id: check-yaml
  6. - id: end-of-file-fixer
  7. - id: trailing-whitespace
  8. - id: check-case-conflict
  9. - id: check-ast
  10. - id: check-added-large-files
  11. args: ["--maxkb=1000"]
  12. - repo: https://github.com/psf/black
  13. rev: 21.9b0
  14. hooks:
  15. - id: black
  16. - repo: https://github.com/pre-commit/mirrors-prettier
  17. rev: v2.3.2
  18. hooks:
  19. - id: prettier
  20. - repo: https://github.com/pycqa/isort
  21. rev: 5.8.0
  22. hooks:
  23. - id: isort
  24. name: isort (python)
  25. # - repo: https://github.com/PyCQA/pydocstyle
  26. # rev: 6.1.1
  27. # hooks:
  28. # - id: pydocstyle
  29. # name: pydocstyle
  30. - repo: https://github.com/pre-commit/mirrors-mypy
  31. rev: v0.920
  32. hooks:
  33. - id: mypy
  34. name: mypy
  35. additional_dependencies: ["requests"]
  36. - repo: local
  37. hooks:
  38. - id: poetry-install
  39. name: Install project deps
  40. entry: poetry install
  41. language: python
  42. additional_dependencies: [pre-commit, poetry]
  43. always_run: true
  44. pass_filenames: false
  45. - id: run-tests
  46. name: Run tests
  47. entry: poetry run pytest
  48. language: python
  49. additional_dependencies: [pre-commit, poetry]
  50. always_run: true
  51. pass_filenames: false