@@ -5,24 +5,18 @@ exclude: |
55 # Files and folders generated by bots, to avoid loops
66 ^setup/|/static/description/index\.html$|
77 # We don't want to mess with tool-generated files
8- .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
8+ .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
99 # Maybe reactivate this when all README files include prettier ignore tags?
1010 ^README\.md$|
1111 # Library files can have extraneous formatting (even minimized)
1212 /static/(src/)?lib/|
1313 # Repos using Sphinx to generate docs don't need prettying
1414 ^docs/_templates/.*\.html$|
15- # Don't bother non-technical authors with formatting issues in docs
16- readme/.*\.(rst|md)$|
17- # Ignore build and dist directories in addons
18- /build/|/dist/|
19- # Ignore test files in addons
20- /tests/samples/.*|
2115 # You don't usually want a bot to modify your legal texts
2216 (LICENSE.*|COPYING.*)
2317default_language_version :
2418 python : python3
25- node : " 22.9 .0"
19+ node : " 14.13 .0"
2620repos :
2721 - repo : local
2822 hooks :
@@ -33,70 +27,49 @@ repos:
3327 entry : found forbidden files; remove them
3428 language : fail
3529 files : " \\ .rej$"
36- - id : en-po-files
37- name : en.po files cannot exist
38- entry : found a en.po file
39- language : fail
40- files : ' [a-zA-Z0-9_]*/i18n/en\.po$'
41- - repo : https://github.com/sbidoul/whool
42- rev : v1.2
43- hooks :
44- - id : whool-init
45- - repo : https://github.com/oca/maintainer-tools
46- rev : bf9ecb9938b6a5deca0ff3d870fbd3f33341fded
30+ # - repo: https://github.com/oca/maintainer-tools
31+ # rev: ab1d7f6
32+ # hooks:
33+ # update the NOT INSTALLABLE ADDONS section above
34+ # - id: oca-update-pre-commit-excluded-addons
35+ # - id: oca-fix-manifest-website
36+ # args: ["https://github.com/OCA/project"]
37+ - repo : https://github.com/myint/autoflake
38+ rev : v1.4
4739 hooks :
48- # update the NOT INSTALLABLE ADDONS section above
49- - id : oca-update-pre-commit-excluded-addons
50- - id : oca-fix-manifest-website
51- args : ["https://github.com/OCA/connector-prestashop"]
52- - id : oca-gen-addon-readme
40+ - id : autoflake
5341 args :
54- - --addons-dir=.
55- - --branch=18.0
56- - --org-name=OCA
57- - --repo-name=connector-prestashop
58- - --if-source-changed
59- - --keep-source-digest
60- - --convert-fragments-to-markdown
61- - id : oca-gen-external-dependencies
62- - repo : https://github.com/OCA/odoo-pre-commit-hooks
63- rev : v0.0.33
42+ - --expand-star-imports
43+ - --ignore-init-module-imports
44+ - --in-place
45+ - --remove-all-unused-imports
46+ - --remove-duplicate-keys
47+ - --remove-unused-variables
48+ - repo : https://github.com/psf/black
49+ rev : 20.8b1
6450 hooks :
65- - id : oca-checks-odoo-module
66- - id : oca-checks-po
67- args :
68- - --disable=po-pretty-format
69- - repo : local
51+ - id : black
52+ - repo : https://github.com/pre-commit/mirrors-prettier
53+ rev : v2.1.2
7054 hooks :
7155 - id : prettier
7256 name : prettier (with plugin-xml)
73- entry : prettier
57+ additional_dependencies :
58+ - " prettier@2.1.2"
59+ - " @prettier/plugin-xml@0.12.0"
7460 args :
75- - --write
76- - --list-different
77- - --ignore-unknown
78- types : [text]
61+ - --plugin=@prettier/plugin-xml
7962 files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
80- language : node
81- additional_dependencies :
82- - " prettier@3.3.3"
83- - " @prettier/plugin-xml@3.4.1"
84- - repo : local
63+ - repo : https://github.com/pre-commit/mirrors-eslint
64+ rev : v7.8.1
8565 hooks :
8666 - id : eslint
87- name : eslint
88- entry : eslint
67+ verbose : true
8968 args :
9069 - --color
9170 - --fix
92- verbose : true
93- types : [javascript]
94- language : node
95- additional_dependencies :
96- - " eslint@9.12.0"
97- - " eslint-plugin-jsdoc@50.3.1"
9871 - repo : https://github.com/pre-commit/pre-commit-hooks
99- rev : v4.6 .0
72+ rev : v3.2 .0
10073 hooks :
10174 - id : trailing-whitespace
10275 # exclude autogenerated files
@@ -117,21 +90,37 @@ repos:
11790 - id : check-xml
11891 - id : mixed-line-ending
11992 args : ["--fix=lf"]
120- - repo : https://github.com/astral-sh/ruff-pre-commit
121- rev : v0.6.8
93+ - repo : https://github.com/asottile/pyupgrade
94+ rev : v2.7.2
95+ hooks :
96+ - id : pyupgrade
97+ args : ["--keep-percent-format"]
98+ - repo : https://github.com/PyCQA/isort
99+ rev : 5.5.1
100+ hooks :
101+ - id : isort
102+ name : isort except __init__.py
103+ args :
104+ - --settings=.
105+ exclude : /__init__\.py$
106+ - repo : https://gitlab.com/pycqa/flake8
107+ rev : 3.9.2
122108 hooks :
123- - id : ruff
124- args : [--fix, --exit-non-zero-on-fix]
125- - id : ruff-format
126- - repo : https://github.com/OCA/pylint-odoo
127- rev : v9.1.3
109+ - id : flake8
110+ additional_dependencies : ["flake8-bugbear==21.9.2"]
111+ - repo : https://github.com/PyCQA/pylint
112+ rev : pylint-2.5.3
128113 hooks :
129- - id : pylint_odoo
114+ - id : pylint
130115 name : pylint with optional checks
131116 args :
132117 - --rcfile=.pylintrc
133118 - --exit-zero
134119 verbose : true
135- - id : pylint_odoo
120+ additional_dependencies : &pylint_deps
121+ - pylint-odoo==3.5.0
122+ - id : pylint
123+ name : pylint with mandatory checks
136124 args :
137125 - --rcfile=.pylintrc-mandatory
126+ additional_dependencies : *pylint_deps
0 commit comments