You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

  1. # SPDX-FileCopyrightText: 2020 Adafruit
  2. #
  3. # SPDX-License-Identifier: Unlicense
  4. repos:
  5. - repo: https://github.com/python/black
  6. rev: 22.3.0
  7. hooks:
  8. - id: black
  9. additional_dependencies: ['click==8.0.4']
  10. - repo: https://github.com/fsfe/reuse-tool
  11. rev: v0.12.1
  12. hooks:
  13. - id: reuse
  14. - repo: https://github.com/pre-commit/pre-commit-hooks
  15. rev: v2.3.0
  16. hooks:
  17. - id: check-yaml
  18. - id: end-of-file-fixer
  19. - id: trailing-whitespace
  20. - repo: https://github.com/pycqa/pylint
  21. rev: v2.11.1
  22. hooks:
  23. - id: pylint
  24. name: pylint (library code)
  25. types: [python]
  26. args:
  27. - --disable=consider-using-f-string,duplicate-code
  28. exclude: "^(docs/|examples/|tests/|setup.py$)"
  29. - id: pylint
  30. name: pylint (example code)
  31. description: Run pylint rules on "examples/*.py" files
  32. types: [python]
  33. files: "^examples/"
  34. args:
  35. - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code
  36. - id: pylint
  37. name: pylint (test code)
  38. description: Run pylint rules on "tests/*.py" files
  39. types: [python]
  40. files: "^tests/"
  41. args:
  42. - --disable=missing-docstring,consider-using-f-string,duplicate-code