.pre-commit-config.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. exclude: ^(data/.*|.vscode/.*)$
  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: v2.42.0
  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.2
  23. hooks:
  24. - id: codespell
  25. name: codespell
  26. - repo: https://github.com/asottile/pyupgrade
  27. rev: v3.3.1
  28. hooks:
  29. - id: pyupgrade
  30. args: [--py39-plus]
  31. - repo: https://github.com/psf/black
  32. rev: 23.1.0
  33. hooks:
  34. - id: black
  35. - repo: https://github.com/pycqa/isort
  36. rev: 5.12.0
  37. hooks:
  38. - id: isort
  39. name: isort (python)
  40. - repo: https://github.com/PyCQA/pydocstyle
  41. rev: 6.3.0
  42. hooks:
  43. - id: pydocstyle
  44. name: pydocstyle
  45. - repo: https://github.com/pre-commit/mirrors-mypy
  46. rev: v1.0.1
  47. hooks:
  48. - id: mypy
  49. name: mypy
  50. additional_dependencies: ["types-pytz"]
  51. - repo: https://github.com/pycqa/pylint
  52. rev: v2.16.2
  53. hooks:
  54. - id: pylint
  55. types: [python]
  56. - repo: local
  57. hooks:
  58. - id: poetry-install
  59. name: Install project deps
  60. entry: poetry install
  61. language: system
  62. always_run: false
  63. types: [python]
  64. pass_filenames: false
  65. stages: [commit, merge-commit, push, manual]
  66. - id: run-tests
  67. name: Run tests
  68. entry: poetry run pytest
  69. language: system
  70. always_run: false
  71. types: [python]
  72. pass_filenames: false
  73. stages: [commit, merge-commit, push, manual]