.pre-commit-config.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. repos:
  2. - repo: https://github.com/asottile/pyupgrade
  3. rev: v2.3.0
  4. hooks:
  5. - id: pyupgrade
  6. args: [--py37-plus]
  7. - repo: https://github.com/psf/black
  8. rev: 19.10b0
  9. hooks:
  10. - id: black
  11. args:
  12. - --safe
  13. - --quiet
  14. files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
  15. - repo: https://github.com/codespell-project/codespell
  16. rev: v1.16.0
  17. hooks:
  18. - id: codespell
  19. args:
  20. - --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
  21. - --skip="./.*,*.csv,*.json"
  22. - --quiet-level=2
  23. exclude_types: [csv, json]
  24. - repo: https://gitlab.com/pycqa/flake8
  25. rev: 3.8.1
  26. hooks:
  27. - id: flake8
  28. additional_dependencies:
  29. - flake8-docstrings==1.5.0
  30. - pydocstyle==5.0.2
  31. files: ^(homeassistant|script|tests)/.+\.py$
  32. - repo: https://github.com/PyCQA/bandit
  33. rev: 1.6.2
  34. hooks:
  35. - id: bandit
  36. args:
  37. - --quiet
  38. - --format=custom
  39. - --configfile=tests/bandit.yaml
  40. files: ^(homeassistant|script|tests)/.+\.py$
  41. - repo: https://github.com/pre-commit/mirrors-isort
  42. rev: v4.3.21
  43. hooks:
  44. - id: isort
  45. - repo: https://github.com/pre-commit/pre-commit-hooks
  46. rev: v2.4.0
  47. hooks:
  48. - id: check-executables-have-shebangs
  49. stages: [manual]
  50. - id: check-json
  51. - repo: https://github.com/pre-commit/mirrors-mypy
  52. rev: v0.770
  53. hooks:
  54. - id: mypy
  55. args:
  56. - --pretty
  57. - --show-error-codes
  58. - --show-error-context