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.

69 lines
1.9 KiB

  1. exclude: "^setup/|/static/lib/|/static/src/lib/"
  2. default_language_version:
  3. python: python3
  4. repos:
  5. - repo: https://github.com/psf/black
  6. rev: 19.3b0
  7. hooks:
  8. - id: black
  9. args: [-l 79]
  10. - repo: https://github.com/pre-commit/pre-commit-hooks
  11. rev: v2.3.0
  12. hooks:
  13. - id: trailing-whitespace
  14. # exclude autogenerated files
  15. exclude: /README\.rst$|\.pot?$
  16. - id: end-of-file-fixer
  17. # exclude autogenerated files
  18. exclude: /README\.rst$|\.pot?$
  19. - id: debug-statements
  20. - id: flake8
  21. name: flake8 except __init__.py
  22. exclude: /__init__\.py$
  23. additional_dependencies: ["flake8-bugbear==19.8.0"]
  24. - id: flake8
  25. name: flake8 only __init__.py
  26. args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py
  27. files: /__init__\.py$
  28. additional_dependencies: ["flake8-bugbear==19.8.0"]
  29. - id: fix-encoding-pragma
  30. args: ["--remove"]
  31. - id: check-case-conflict
  32. - id: check-docstring-first
  33. - id: check-executables-have-shebangs
  34. - id: check-merge-conflict
  35. - id: check-symlinks
  36. - id: check-xml
  37. - id: mixed-line-ending
  38. args: ["--fix=lf"]
  39. - repo: https://github.com/pre-commit/mirrors-pylint
  40. rev: v2.3.1
  41. hooks:
  42. - id: pylint
  43. name: pylint with optional checks
  44. args: ["--rcfile=.pylintrc", "--exit-zero"]
  45. verbose: true
  46. additional_dependencies: ["pylint-odoo==3.0.3"]
  47. - id: pylint
  48. name: pylint with mandatory checks
  49. args: ["--rcfile=.pylintrc-mandatory"]
  50. additional_dependencies: ["pylint-odoo==3.0.3"]
  51. - repo: https://github.com/asottile/pyupgrade
  52. rev: v1.24.0
  53. hooks:
  54. - id: pyupgrade
  55. - repo: https://github.com/asottile/seed-isort-config
  56. rev: v1.9.3
  57. hooks:
  58. - id: seed-isort-config
  59. - repo: https://github.com/pre-commit/mirrors-isort
  60. rev: v4.3.21
  61. hooks:
  62. - id: isort
  63. name: isort except __init__.py
  64. exclude: /__init__\.py$
  65. #- repo: https://github.com/pre-commit/mirrors-eslint
  66. # rev: v6.5.1
  67. # hooks:
  68. # - id: eslint
  69. # verbose: true