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.

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