.pre-commit-config.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. exclude: ^(data/.*|.vscode/.*|poetry.lock)$
  2. repos:
  3. - repo: https://github.com/commitizen-tools/commitizen
  4. # Please run `pre-commit install --hook-type commit-msg` to check commit messages
  5. rev: 3.2.1
  6. hooks:
  7. - id: commitizen
  8. - repo: https://github.com/pre-commit/pre-commit-hooks
  9. rev: v4.4.0
  10. hooks:
  11. - id: check-yaml
  12. - id: check-json
  13. - id: check-toml
  14. - id: end-of-file-fixer
  15. - id: trailing-whitespace
  16. - id: detect-private-key
  17. - id: check-case-conflict
  18. - id: check-ast
  19. - id: check-added-large-files
  20. args: ["--maxkb=1000"]
  21. - repo: https://github.com/codespell-project/codespell.git
  22. rev: v2.2.4
  23. hooks:
  24. - id: codespell
  25. name: codespell
  26. - repo: https://github.com/asottile/pyupgrade
  27. rev: v3.4.0
  28. hooks:
  29. - id: pyupgrade
  30. args: [--py39-plus]
  31. - repo: https://github.com/hadialqattan/pycln
  32. rev: v2.1.3
  33. hooks:
  34. - id: pycln
  35. name: pycln (python)
  36. args: [--config=pyproject.toml]
  37. - repo: https://github.com/psf/black
  38. rev: 23.3.0
  39. hooks:
  40. - id: black
  41. - repo: https://github.com/pycqa/isort
  42. rev: 5.12.0
  43. hooks:
  44. - id: isort
  45. name: isort (python)
  46. - repo: https://github.com/PyCQA/pydocstyle
  47. rev: 6.3.0
  48. hooks:
  49. - id: pydocstyle
  50. name: pydocstyle
  51. - repo: https://github.com/pre-commit/mirrors-mypy
  52. rev: v1.2.0
  53. hooks:
  54. - id: mypy
  55. name: mypy
  56. additional_dependencies: ["types-pytz"]
  57. - repo: https://github.com/pycqa/pylint
  58. rev: v2.17.4
  59. hooks:
  60. - id: pylint
  61. types: [python]
  62. - repo: local
  63. hooks:
  64. - id: poetry-install
  65. name: Install project deps
  66. entry: poetry install
  67. language: system
  68. always_run: false
  69. types: [python]
  70. pass_filenames: false
  71. stages: [commit, merge-commit, push, manual]
  72. - id: run-tests
  73. name: Run tests
  74. entry: poetry run pytest
  75. language: system
  76. always_run: false
  77. types: [python]
  78. pass_filenames: false
  79. stages: [commit, merge-commit, push, manual]