.pre-commit-config.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ---
  2. repos:
  3. - repo: https://github.com/pre-commit/pre-commit-hooks
  4. rev: v5.0.0
  5. hooks:
  6. - id: check-symlinks
  7. - id: destroyed-symlinks
  8. - id: trailing-whitespace
  9. - id: end-of-file-fixer
  10. - id: check-yaml
  11. - id: check-toml
  12. - id: check-ast
  13. - id: check-added-large-files
  14. - id: check-merge-conflict
  15. - id: check-executables-have-shebangs
  16. - id: check-shebang-scripts-are-executable
  17. - id: detect-private-key
  18. - id: debug-statements
  19. - repo: https://github.com/python/black
  20. rev: 24.10.0
  21. hooks:
  22. - id: black
  23. - repo: https://github.com/codespell-project/codespell
  24. rev: v2.3.0
  25. hooks:
  26. - id: codespell
  27. args:
  28. - --ignore-words-list=linz
  29. - repo: https://github.com/PyCQA/flake8
  30. rev: 7.1.1
  31. hooks:
  32. - id: flake8
  33. args:
  34. - '--per-file-ignores=*/__init__.py:F401'
  35. - --ignore=E203, W503
  36. - --max-complexity=30
  37. - --max-line-length=456
  38. - --show-source
  39. - --statistics
  40. - repo: https://github.com/PyCQA/isort
  41. rev: 5.13.2
  42. hooks:
  43. - id: isort
  44. args: ["--profile", "black"]
  45. # - repo: https://github.com/pycqa/pydocstyle
  46. # rev: 6.1.1
  47. # hooks:
  48. # - id: pydocstyle
  49. # args:
  50. # - --source
  51. # - --explain
  52. # - --convention=google
  53. # additional_dependencies: ["toml"]
  54. - repo: https://github.com/asottile/pyupgrade
  55. rev: v3.19.1
  56. hooks:
  57. - id: pyupgrade
  58. args: ["--py37-plus"]
  59. # - repo: local
  60. # hooks:
  61. # - id: pyright
  62. # name: pyright
  63. # entry: pyright
  64. # language: node
  65. # pass_filenames: false
  66. # types: [python]
  67. # additional_dependencies: ["pyright@1.1.383"]
  68. # args:
  69. # - --project=pyproject.toml