.pre-commit-config.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. repos:
  2. - repo: https://github.com/pre-commit/pre-commit-hooks
  3. rev: v4.4.0
  4. hooks:
  5. - id: check-yaml
  6. - id: trailing-whitespace
  7. - repo: https://github.com/myint/autoflake
  8. rev: "v2.0.1"
  9. hooks:
  10. - id: autoflake
  11. args:
  12. [
  13. "--recursive",
  14. "--in-place",
  15. "--remove-unused-variables",
  16. "--remove-all-unused-imports",
  17. "--ignore-init-module-imports",
  18. ]
  19. - repo: https://github.com/asottile/pyupgrade
  20. rev: v3.3.1
  21. hooks:
  22. - id: pyupgrade
  23. args:
  24. [
  25. "--py3-plus",
  26. "--py36-plus",
  27. "--py37-plus",
  28. "--py38-plus",
  29. "--py39-plus",
  30. "--py310-plus",
  31. "--py311-plus",
  32. ]
  33. files: ".*"
  34. - repo: https://github.com/psf/black
  35. rev: "23.1.0"
  36. hooks:
  37. - id: black
  38. - repo: https://github.com/pycqa/isort
  39. rev: "5.12.0"
  40. hooks:
  41. - id: isort
  42. - repo: https://github.com/PyCQA/flake8
  43. rev: "6.0.0"
  44. hooks:
  45. - id: flake8
  46. - repo: https://github.com/python-poetry/poetry
  47. rev: "1.3.0"
  48. hooks:
  49. - id: poetry-export
  50. args: ["-o", "requirements.txt", "--without-hashes"]
  51. - repo: https://github.com/python-poetry/poetry
  52. rev: "1.3.0"
  53. hooks:
  54. - id: poetry-export
  55. args:
  56. ["-o", "requirements-dev.txt", "--without-hashes", "--with", "dev"]