pre-commit-vauxoo 8.3.20__tar.gz → 8.3.22__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.bumpversion.cfg +1 -1
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ChangeLog +16 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/PKG-INFO +99 -1
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/README.rst +82 -2
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/conf.py +1 -1
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/requirements.txt +2 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/setup.py +1 -1
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/__init__.py +1 -0
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.bandit-experimental.yml.jinja +22 -0
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.flake8-optional.jinja +33 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.flake8.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.flake8.jinja +0 -9
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.oca_hooks-autofix.cfg.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.oca_hooks-autofix.cfg.jinja +0 -2
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.pre-commit-config-optional.yaml.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pre-commit-config-optional.yaml.jinja +0 -30
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pre-commit-config.yaml.jinja +97 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.pylintrc-optional.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pylintrc-optional.jinja +1 -9
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pylintrc.jinja +397 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.bandit-experimental.yml.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.bandit-experimental.yml.jinja +0 -4
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.flake8-optional.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.flake8-optional.jinja +0 -25
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.flake8.jinja +17 -0
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.oca_hooks-autofix.cfg.jinja +16 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if use_ruff %}.pre-commit-config-autofix.yaml{% endif %}.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.pre-commit-config-autofix.yaml.jinja +1 -1
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.pre-commit-config-optional.yaml.jinja +105 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.pre-commit-config.yaml.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.pre-commit-config.yaml.jinja +1 -15
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.pylintrc-optional.jinja +75 -0
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/.pylintrc.jinja → pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.pylintrc.jinja +1 -6
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cli.py +29 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/hooks/check_commit_msg.py +11 -49
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/pre_commit_vauxoo.py +562 -10
- pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/version_check.py +206 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/PKG-INFO +99 -1
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/SOURCES.txt +24 -15
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/requires.txt +2 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/test_pre_commit_vauxoo.py +518 -8
- pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/__init__.py +0 -1
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.appveyor.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.cookiecutterrc +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.coveragerc +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.github/workflows/github-actions.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.readthedocs.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/.travis.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/AUTHORS.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/CONTRIBUTING.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/LICENSE +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/MANIFEST.in +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/bootstrap.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/requirements.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/templates/.appveyor.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/templates/.github/workflows/github-actions.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/templates/.travis.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/ci/templates/tox.ini +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/authors.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/changelog.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/contributing.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/index.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/readme.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/requirements.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/docs/spelling_wordlist.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/pytest.ini +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/README.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/__manifest__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/demo/demo.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/models/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/models/models.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/security/ir.model.access.csv +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_autofix1/views/views.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/README.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/__manifest__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/deactivate.jinja +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/demo/demo.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/models/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/models/markupsafe_sanitized.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/models/models.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/security/ir.model.access.csv +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/static/src/js/example.js +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_example1/views/views.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_uninstallable/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_uninstallable/__manifest__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_uninstallable/models/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_uninstallable/models/non_install.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/README.rst +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/__manifest__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/demo/demo.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/models/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/models/models.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/security/ir.model.access.csv +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/tests/data/ruff_optional_use_cases.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/resources/module_warnings1/views/views.xml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/setup.cfg +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/__main__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.bandit-optional.yml +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.editorconfig +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.eslintrc.config.mjs +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.isort.cfg +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.markdownlint-autofix.yaml.jinja +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.oca_hooks.cfg.jinja +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/.prettierrc.config.cjs.jinja +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/doc8.ini +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/cfg/pyproject.toml.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}.pre-commit-config-autofix.yaml{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pre-commit-config-autofix.yaml.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}.pylintrc-experimental{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if not use_ruff %}no_ruff{% endif %}/.pylintrc-experimental.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if use_ruff %}.ruff-autofix.toml{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.ruff-autofix.toml.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if use_ruff %}.ruff-experimental.toml{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.ruff-experimental.toml.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if use_ruff %}.ruff-optional.toml{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.ruff-optional.toml.jinja +0 -0
- /pre_commit_vauxoo-8.3.20/src/pre_commit_vauxoo/cfg/{% if use_ruff %}.ruff.toml{% endif %}.jinja → /pre_commit_vauxoo-8.3.22/src/pre_commit_vauxoo/cfg/{% if use_ruff %}ruff{% endif %}/.ruff.toml.jinja +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/git_hook_pre_commit +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/hooks/__init__.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/hooks/check_deactivate_jinja.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo/logging_colored.py +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/dependency_links.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/entry_points.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/not-zip-safe +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/src/pre_commit_vauxoo.egg-info/top_level.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/data_ruff/ruff_mandatory_use_cases.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/data_ruff/ruff_migrations_security_use_cases.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/data_ruff/ruff_optional_bandit_use_cases.txt +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/diffs/module_autofix1_expected_10.diff +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/diffs/module_autofix1_expected_20.diff +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tests/diffs/module_autofix1_expected_30.diff +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/tox.ini +0 -0
- {pre_commit_vauxoo-8.3.20 → pre_commit_vauxoo-8.3.22}/variables.sh +0 -0
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
v8.3.22
|
|
5
|
+
-------
|
|
6
|
+
|
|
7
|
+
* Bump version: 8.3.21 → 8.3.22
|
|
8
|
+
* [IMP] cfg: Update ruff-odoo to 0.16.3.34 (#301)
|
|
9
|
+
|
|
10
|
+
v8.3.21
|
|
11
|
+
-------
|
|
12
|
+
|
|
13
|
+
* Bump version: 8.3.20 → 8.3.21
|
|
14
|
+
* [FIX] pre\_commit\_vauxoo: do not depend on a git newer than the one of Ubuntu 20.04
|
|
15
|
+
* [REF] cfg: put the ruff condition on a folder, never on a file (#294)
|
|
16
|
+
* [ADD] cli: --autofixes-commit-by-module, a commit per module (#299)
|
|
17
|
+
* [ADD] version\_check: warn when a newer release is on PyPI (#298)
|
|
18
|
+
* [ADD] src: --last-commits scope, checking every commit since stable (#293)
|
|
19
|
+
|
|
4
20
|
v8.3.20
|
|
5
21
|
-------
|
|
6
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pre-commit-vauxoo
|
|
3
|
-
Version: 8.3.
|
|
3
|
+
Version: 8.3.22
|
|
4
4
|
Summary: pre-commit script to run automatically the configuration and variables custom from Vauxoo
|
|
5
5
|
Home-page: https://github.com/Vauxoo/pre-commit-vauxoo
|
|
6
6
|
Author: Vauxoo
|
|
@@ -30,9 +30,11 @@ License-File: AUTHORS.rst
|
|
|
30
30
|
Requires-Dist: click<=8.1.8
|
|
31
31
|
Requires-Dist: copier
|
|
32
32
|
Requires-Dist: jinja2
|
|
33
|
+
Requires-Dist: packaging
|
|
33
34
|
Requires-Dist: pathspec<1.0.0
|
|
34
35
|
Requires-Dist: pgsanity
|
|
35
36
|
Requires-Dist: pre-commit
|
|
37
|
+
Requires-Dist: pyyaml
|
|
36
38
|
Dynamic: author
|
|
37
39
|
Dynamic: author-email
|
|
38
40
|
Dynamic: classifier
|
|
@@ -82,6 +84,15 @@ Or using virtualenv
|
|
|
82
84
|
|
|
83
85
|
You can confirm your environment running `pre-commit-vauxoo --version`
|
|
84
86
|
|
|
87
|
+
Every run checks once a day if a newer version was released on PyPI and prints a yellow
|
|
88
|
+
warning when the installed one is outdated. The answer is cached in the pre-commit cache
|
|
89
|
+
directory (``PRE_COMMIT_HOME``, ``~/.cache/pre-commit`` by default) so pypi.org is queried
|
|
90
|
+
at most once every 24 hours. Set ``PRE_COMMIT_VAUXOO_SKIP_VERSION_CHECK=1`` to disable it.
|
|
91
|
+
|
|
92
|
+
The warning suggests the command that updates the installation printing the warning: the
|
|
93
|
+
interpreter currently running instead of a bare ``python``, plus ``--user`` when the package
|
|
94
|
+
lives in the per-user site-packages and ``sudo`` when its directory is not writable.
|
|
95
|
+
|
|
85
96
|
Usage
|
|
86
97
|
=====
|
|
87
98
|
|
|
@@ -99,6 +110,36 @@ the following options to get a faster result:
|
|
|
99
110
|
|
|
100
111
|
pre-commit-vauxoo --last-commit # only the files added or modified by the last commit
|
|
101
112
|
|
|
113
|
+
pre-commit-vauxoo --last-commits # only the files added or modified since the stable branch
|
|
114
|
+
|
|
115
|
+
The stable branch is the one named by the ``VERSION`` variable, e.g. ``18.0``. It is
|
|
116
|
+
looked up as ``<remote>/<VERSION>`` on the remotes whose URL does not contain ``dev``,
|
|
117
|
+
preferring ``origin``, and only as the local branch ``<VERSION>`` when no remote has it:
|
|
118
|
+
the dev fork is where the branch being checked lives, so its copy of stable is the stale
|
|
119
|
+
one. That same revision is what says how many commits are yours, so ``--last-commits``
|
|
120
|
+
also validates the message of each one of them, and ``--last-commit`` validates the
|
|
121
|
+
message of ``HEAD`` alone.
|
|
122
|
+
|
|
123
|
+
A massive reformat is reviewed module by module, so the autofixes can be committed
|
|
124
|
+
that way instead of as a single commit changing the whole repository:
|
|
125
|
+
|
|
126
|
+
pre-commit-vauxoo --autofixes-commit-by-module
|
|
127
|
+
|
|
128
|
+
It needs a working tree with no changes, since it commits what the autofix hooks
|
|
129
|
+
change, and it writes a commit per module naming every check that fixed it:
|
|
130
|
+
|
|
131
|
+
::
|
|
132
|
+
|
|
133
|
+
[REF] module_name: Run autofixes from pre-commit-vauxoo
|
|
134
|
+
|
|
135
|
+
- Autofix [attribute-string-redundant](https://vauxoo.github.io/ruff-odoo/rules/attribute-string-redundant/)
|
|
136
|
+
- Autofix [unused-import](https://docs.astral.sh/ruff/rules/unused-import/)
|
|
137
|
+
- Autofix [ruff-format](https://docs.astral.sh/ruff/formatter/)
|
|
138
|
+
|
|
139
|
+
The checks are the ones ruff-odoo and the OCA hooks report, the tools that name what
|
|
140
|
+
they fixed. A tool that only reformats, e.g. the formatters, is named by itself and
|
|
141
|
+
linked to its own documentation.
|
|
142
|
+
|
|
102
143
|
Full --help command result:
|
|
103
144
|
|
|
104
145
|
::
|
|
@@ -116,6 +157,10 @@ Full --help command result:
|
|
|
116
157
|
is the default one.
|
|
117
158
|
--last-commit Run the hooks only on the files added or
|
|
118
159
|
modified by the last commit (HEAD).
|
|
160
|
+
--last-commits Run the hooks only on the files added or
|
|
161
|
+
modified since the stable branch named by
|
|
162
|
+
VERSION, and validate the message of every
|
|
163
|
+
commit in that range.
|
|
119
164
|
--diff Run the hooks only on the files with
|
|
120
165
|
changes not committed yet: staged,
|
|
121
166
|
unstaged and untracked ones.
|
|
@@ -202,6 +247,21 @@ Full --help command result:
|
|
|
202
247
|
|
|
203
248
|
Now your command 'git commit' will run 'pre-
|
|
204
249
|
commit-vauxoo --diff' before to commit
|
|
250
|
+
--autofixes-commit-by-module Commit the changes made by the autofix
|
|
251
|
+
hooks, one commit per module
|
|
252
|
+
|
|
253
|
+
It is the standard way of reviewing a
|
|
254
|
+
massive reformat: a commit per module,
|
|
255
|
+
titled '[REF] module_name: Run autofixes
|
|
256
|
+
from pre-commit-vauxoo' and listing the
|
|
257
|
+
checks that fixed it, linked to their
|
|
258
|
+
documentation
|
|
259
|
+
|
|
260
|
+
It needs a clean working tree, since the
|
|
261
|
+
changes not committed yet would be
|
|
262
|
+
committed as if an autofix had made them,
|
|
263
|
+
and it enables the 'fix' hooks [env var:
|
|
264
|
+
PRECOMMIT_AUTOFIXES_COMMIT_BY_MODULE]
|
|
205
265
|
--version Show the version of this package
|
|
206
266
|
--odoo-version TEXT Odoo version used for the repository.
|
|
207
267
|
|
|
@@ -333,6 +393,28 @@ Note, to combine the coverage data from all the tox environments run:
|
|
|
333
393
|
|
|
334
394
|
PYTEST_ADDOPTS=--cov-append tox
|
|
335
395
|
|
|
396
|
+
Layout of the configuration templates
|
|
397
|
+
-------------------------------------
|
|
398
|
+
|
|
399
|
+
The templates live in ``src/pre_commit_vauxoo/cfg/``. The ones that do not depend
|
|
400
|
+
on ruff sit at its root, and the ones that do live in one of two folders whose
|
|
401
|
+
name *is* the condition::
|
|
402
|
+
|
|
403
|
+
src/pre_commit_vauxoo/cfg/
|
|
404
|
+
.oca_hooks.cfg.jinja # same with and without ruff
|
|
405
|
+
{% if use_ruff %}ruff{% endif %}/ # rendered only with ruff enabled
|
|
406
|
+
{% if not use_ruff %}no_ruff{% endif %}/
|
|
407
|
+
|
|
408
|
+
copier renders the folder whose condition matched and skips the other subtree
|
|
409
|
+
entirely; ``copy_cfg_files`` then moves its files up into ``.config/``, so the
|
|
410
|
+
result is the same flat folder as always.
|
|
411
|
+
|
|
412
|
+
The condition is only allowed there. A template must not test ``use_ruff`` in its
|
|
413
|
+
content, and a file name must not carry a jinja expression: a file called
|
|
414
|
+
``{% if use_ruff %}.ruff.toml{% endif %}.jinja`` can not be opened, completed or
|
|
415
|
+
grepped like the rest of the repository. The two variants of a file are two real
|
|
416
|
+
files, and a check migrated to ruff is simply absent from the ``no_ruff`` one.
|
|
417
|
+
|
|
336
418
|
Updating the pylint-odoo and ruff-odoo revs
|
|
337
419
|
-------------------------------------------
|
|
338
420
|
|
|
@@ -357,6 +439,22 @@ without touching the package's own ``.bumpversion.cfg``.
|
|
|
357
439
|
CHANGES
|
|
358
440
|
=======
|
|
359
441
|
|
|
442
|
+
v8.3.22
|
|
443
|
+
-------
|
|
444
|
+
|
|
445
|
+
* Bump version: 8.3.21 → 8.3.22
|
|
446
|
+
* [IMP] cfg: Update ruff-odoo to 0.16.3.34 (#301)
|
|
447
|
+
|
|
448
|
+
v8.3.21
|
|
449
|
+
-------
|
|
450
|
+
|
|
451
|
+
* Bump version: 8.3.20 → 8.3.21
|
|
452
|
+
* [FIX] pre\_commit\_vauxoo: do not depend on a git newer than the one of Ubuntu 20.04
|
|
453
|
+
* [REF] cfg: put the ruff condition on a folder, never on a file (#294)
|
|
454
|
+
* [ADD] cli: --autofixes-commit-by-module, a commit per module (#299)
|
|
455
|
+
* [ADD] version\_check: warn when a newer release is on PyPI (#298)
|
|
456
|
+
* [ADD] src: --last-commits scope, checking every commit since stable (#293)
|
|
457
|
+
|
|
360
458
|
v8.3.20
|
|
361
459
|
-------
|
|
362
460
|
|
|
@@ -50,9 +50,9 @@ Overview
|
|
|
50
50
|
:alt: Supported versions
|
|
51
51
|
:target: https://pypi.org/project/pre-commit-vauxoo
|
|
52
52
|
|
|
53
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/Vauxoo/pre-commit-vauxoo/v8.3.
|
|
53
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/Vauxoo/pre-commit-vauxoo/v8.3.22.svg
|
|
54
54
|
:alt: Commits since latest release
|
|
55
|
-
:target: https://github.com/Vauxoo/pre-commit-vauxoo/compare/v8.3.
|
|
55
|
+
:target: https://github.com/Vauxoo/pre-commit-vauxoo/compare/v8.3.22...main
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
@@ -83,6 +83,15 @@ Or using virtualenv
|
|
|
83
83
|
|
|
84
84
|
You can confirm your environment running `pre-commit-vauxoo --version`
|
|
85
85
|
|
|
86
|
+
Every run checks once a day if a newer version was released on PyPI and prints a yellow
|
|
87
|
+
warning when the installed one is outdated. The answer is cached in the pre-commit cache
|
|
88
|
+
directory (``PRE_COMMIT_HOME``, ``~/.cache/pre-commit`` by default) so pypi.org is queried
|
|
89
|
+
at most once every 24 hours. Set ``PRE_COMMIT_VAUXOO_SKIP_VERSION_CHECK=1`` to disable it.
|
|
90
|
+
|
|
91
|
+
The warning suggests the command that updates the installation printing the warning: the
|
|
92
|
+
interpreter currently running instead of a bare ``python``, plus ``--user`` when the package
|
|
93
|
+
lives in the per-user site-packages and ``sudo`` when its directory is not writable.
|
|
94
|
+
|
|
86
95
|
Usage
|
|
87
96
|
=====
|
|
88
97
|
|
|
@@ -100,6 +109,36 @@ the following options to get a faster result:
|
|
|
100
109
|
|
|
101
110
|
pre-commit-vauxoo --last-commit # only the files added or modified by the last commit
|
|
102
111
|
|
|
112
|
+
pre-commit-vauxoo --last-commits # only the files added or modified since the stable branch
|
|
113
|
+
|
|
114
|
+
The stable branch is the one named by the ``VERSION`` variable, e.g. ``18.0``. It is
|
|
115
|
+
looked up as ``<remote>/<VERSION>`` on the remotes whose URL does not contain ``dev``,
|
|
116
|
+
preferring ``origin``, and only as the local branch ``<VERSION>`` when no remote has it:
|
|
117
|
+
the dev fork is where the branch being checked lives, so its copy of stable is the stale
|
|
118
|
+
one. That same revision is what says how many commits are yours, so ``--last-commits``
|
|
119
|
+
also validates the message of each one of them, and ``--last-commit`` validates the
|
|
120
|
+
message of ``HEAD`` alone.
|
|
121
|
+
|
|
122
|
+
A massive reformat is reviewed module by module, so the autofixes can be committed
|
|
123
|
+
that way instead of as a single commit changing the whole repository:
|
|
124
|
+
|
|
125
|
+
pre-commit-vauxoo --autofixes-commit-by-module
|
|
126
|
+
|
|
127
|
+
It needs a working tree with no changes, since it commits what the autofix hooks
|
|
128
|
+
change, and it writes a commit per module naming every check that fixed it:
|
|
129
|
+
|
|
130
|
+
::
|
|
131
|
+
|
|
132
|
+
[REF] module_name: Run autofixes from pre-commit-vauxoo
|
|
133
|
+
|
|
134
|
+
- Autofix [attribute-string-redundant](https://vauxoo.github.io/ruff-odoo/rules/attribute-string-redundant/)
|
|
135
|
+
- Autofix [unused-import](https://docs.astral.sh/ruff/rules/unused-import/)
|
|
136
|
+
- Autofix [ruff-format](https://docs.astral.sh/ruff/formatter/)
|
|
137
|
+
|
|
138
|
+
The checks are the ones ruff-odoo and the OCA hooks report, the tools that name what
|
|
139
|
+
they fixed. A tool that only reformats, e.g. the formatters, is named by itself and
|
|
140
|
+
linked to its own documentation.
|
|
141
|
+
|
|
103
142
|
Full --help command result:
|
|
104
143
|
|
|
105
144
|
::
|
|
@@ -117,6 +156,10 @@ Full --help command result:
|
|
|
117
156
|
is the default one.
|
|
118
157
|
--last-commit Run the hooks only on the files added or
|
|
119
158
|
modified by the last commit (HEAD).
|
|
159
|
+
--last-commits Run the hooks only on the files added or
|
|
160
|
+
modified since the stable branch named by
|
|
161
|
+
VERSION, and validate the message of every
|
|
162
|
+
commit in that range.
|
|
120
163
|
--diff Run the hooks only on the files with
|
|
121
164
|
changes not committed yet: staged,
|
|
122
165
|
unstaged and untracked ones.
|
|
@@ -203,6 +246,21 @@ Full --help command result:
|
|
|
203
246
|
|
|
204
247
|
Now your command 'git commit' will run 'pre-
|
|
205
248
|
commit-vauxoo --diff' before to commit
|
|
249
|
+
--autofixes-commit-by-module Commit the changes made by the autofix
|
|
250
|
+
hooks, one commit per module
|
|
251
|
+
|
|
252
|
+
It is the standard way of reviewing a
|
|
253
|
+
massive reformat: a commit per module,
|
|
254
|
+
titled '[REF] module_name: Run autofixes
|
|
255
|
+
from pre-commit-vauxoo' and listing the
|
|
256
|
+
checks that fixed it, linked to their
|
|
257
|
+
documentation
|
|
258
|
+
|
|
259
|
+
It needs a clean working tree, since the
|
|
260
|
+
changes not committed yet would be
|
|
261
|
+
committed as if an autofix had made them,
|
|
262
|
+
and it enables the 'fix' hooks [env var:
|
|
263
|
+
PRECOMMIT_AUTOFIXES_COMMIT_BY_MODULE]
|
|
206
264
|
--version Show the version of this package
|
|
207
265
|
--odoo-version TEXT Odoo version used for the repository.
|
|
208
266
|
|
|
@@ -334,6 +392,28 @@ Note, to combine the coverage data from all the tox environments run:
|
|
|
334
392
|
|
|
335
393
|
PYTEST_ADDOPTS=--cov-append tox
|
|
336
394
|
|
|
395
|
+
Layout of the configuration templates
|
|
396
|
+
-------------------------------------
|
|
397
|
+
|
|
398
|
+
The templates live in ``src/pre_commit_vauxoo/cfg/``. The ones that do not depend
|
|
399
|
+
on ruff sit at its root, and the ones that do live in one of two folders whose
|
|
400
|
+
name *is* the condition::
|
|
401
|
+
|
|
402
|
+
src/pre_commit_vauxoo/cfg/
|
|
403
|
+
.oca_hooks.cfg.jinja # same with and without ruff
|
|
404
|
+
{% if use_ruff %}ruff{% endif %}/ # rendered only with ruff enabled
|
|
405
|
+
{% if not use_ruff %}no_ruff{% endif %}/
|
|
406
|
+
|
|
407
|
+
copier renders the folder whose condition matched and skips the other subtree
|
|
408
|
+
entirely; ``copy_cfg_files`` then moves its files up into ``.config/``, so the
|
|
409
|
+
result is the same flat folder as always.
|
|
410
|
+
|
|
411
|
+
The condition is only allowed there. A template must not test ``use_ruff`` in its
|
|
412
|
+
content, and a file name must not carry a jinja expression: a file called
|
|
413
|
+
``{% if use_ruff %}.ruff.toml{% endif %}.jinja`` can not be opened, completed or
|
|
414
|
+
grepped like the rest of the repository. The two variants of a file are two real
|
|
415
|
+
files, and a check migrated to ruff is simply absent from the ``no_ruff`` one.
|
|
416
|
+
|
|
337
417
|
Updating the pylint-odoo and ruff-odoo revs
|
|
338
418
|
-------------------------------------------
|
|
339
419
|
|
|
@@ -37,7 +37,7 @@ def read(*names, **kwargs):
|
|
|
37
37
|
|
|
38
38
|
setup(
|
|
39
39
|
name="pre-commit-vauxoo",
|
|
40
|
-
version="8.3.
|
|
40
|
+
version="8.3.22",
|
|
41
41
|
license="LGPL-3.0-or-later",
|
|
42
42
|
description="pre-commit script to run automatically the configuration and variables custom from Vauxoo",
|
|
43
43
|
long_description_content_type="text/x-rst",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "8.3.22"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
exclude_dirs:
|
|
2
|
+
- tests
|
|
3
|
+
|
|
4
|
+
# B608: hardcoded_sql_expressions they are considered from pylint-odoo
|
|
5
|
+
# B313,B314,B315,B316,B317,B318,B319,B405,B406,B407,B408,B409: defusedxml checks
|
|
6
|
+
# Odoo's team via inbox twitter is not convinced to repair them and the entire Odoo is raising these checks
|
|
7
|
+
# B704: It is already enabled from .bandit-optional.yml
|
|
8
|
+
skips:
|
|
9
|
+
- B608
|
|
10
|
+
- B313
|
|
11
|
+
- B314
|
|
12
|
+
- B315
|
|
13
|
+
- B316
|
|
14
|
+
- B317
|
|
15
|
+
- B318
|
|
16
|
+
- B319
|
|
17
|
+
- B405
|
|
18
|
+
- B406
|
|
19
|
+
- B407
|
|
20
|
+
- B408
|
|
21
|
+
- B409
|
|
22
|
+
- B704
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[flake8]
|
|
2
|
+
max-line-length = 119
|
|
3
|
+
# flake8 spells its parallel mode "auto", not 0 like pylint does: a numeric 0 is taken
|
|
4
|
+
# literally as "0 jobs", which makes flake8 fall back to run_serial() and check every file
|
|
5
|
+
# in a single process. Its pre-commit hook declares require_serial: true precisely because
|
|
6
|
+
# flake8 is expected to parallelize on its own, so there was nothing else parallelizing it
|
|
7
|
+
jobs = auto
|
|
8
|
+
{%- if additional_builtins %}
|
|
9
|
+
# Names injected at runtime, from LINT_ADDITIONAL_BUILTINS
|
|
10
|
+
builtins = {{ additional_builtins | join(",") }}
|
|
11
|
+
{%- endif %}
|
|
12
|
+
# B = bugbear
|
|
13
|
+
# B9 = bugbear opinionated (incl line length +10% tolerance)
|
|
14
|
+
select = C,E,F,W,B,B9
|
|
15
|
+
# B024: Odoo is not common to use ABC Classes not big deal to ignore it.
|
|
16
|
+
# B036: Don't except `BaseException` unless you plan to re-raise it. (covered by pylint)
|
|
17
|
+
# E203 whitespace before ':' (black behaviour)
|
|
18
|
+
# E501: flake8 line length (covered by bugbear B950)
|
|
19
|
+
# W503: line break before binary operator (black behaviour)
|
|
20
|
+
# W504: line break after binary operator (black behaviour?)
|
|
21
|
+
# E241: E241 multiple spaces after ',' (Better autofixing)
|
|
22
|
+
# B023: Function definition does not bind loop variable 'item'. (Odoo needs it [self.filtered(lambda l: l.item_id == item) for item in items])
|
|
23
|
+
# E226: missing whitespace around arithmetic operator (Better autofixing)
|
|
24
|
+
# B904: Within an `except` clause, raise exceptions with `raise (It is valid for us)
|
|
25
|
+
# E123: closing bracket does not match indentation of opening bracket's line (Better autofixing)
|
|
26
|
+
# E275: missing whitespace after keyword (Better autofixing)
|
|
27
|
+
# B905: zip(strict=True) only works in python >= 3.10
|
|
28
|
+
# B907: We sometimes quote for stylistic purposes
|
|
29
|
+
# F401: imported but unused (like __init__ already works)
|
|
30
|
+
ignore = B024,B036,E203,E501,W503,W504,E241,B023,E226,B904,B905,B907,E123,E275
|
|
31
|
+
per-file-ignores =
|
|
32
|
+
__init__.py:F401
|
|
33
|
+
__manifest__.py:B018
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
[flake8]
|
|
2
|
-
{% if use_ruff -%}
|
|
3
|
-
# The pyflakes (F) and most of the pycodestyle (E,W) checks were migrated to ruff (.config/.ruff.toml)
|
|
4
|
-
# Only the continuation-line indentation rules (E12x/E13x) and E704 keep running here
|
|
5
|
-
# since ruff does not implement them https://github.com/astral-sh/ruff/issues/2402
|
|
6
|
-
select = E12,E13,E704
|
|
7
|
-
# E123,E133 keep being ignored (same as before the ruff migration)
|
|
8
|
-
ignore = E123,E133
|
|
9
|
-
{%- else -%}
|
|
10
2
|
# B024: Odoo is not common to use ABC Classes not big deal to ignore it.
|
|
11
3
|
# B036: Don't except `BaseException` unless you plan to re-raise it. (covered by pylint)
|
|
12
4
|
# E123,E133,E226,E241,E242 are ignored by default by pep8 and flake8
|
|
@@ -20,7 +12,6 @@ ignore = E123,E133
|
|
|
20
12
|
ignore = B024,B036,E123,E133,E203,E226,E241,E242,E501,E741,F811,F601,W503,W504
|
|
21
13
|
per-file-ignores=
|
|
22
14
|
__init__.py:F401
|
|
23
|
-
{%- endif %}
|
|
24
15
|
max-line-length = 119
|
|
25
16
|
# flake8 spells its parallel mode "auto", not 0 like pylint does: a numeric 0 is taken
|
|
26
17
|
# literally as "0 jobs", which makes flake8 fall back to run_serial() and check every file
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
[MESSAGES_CONTROL]
|
|
2
2
|
enable=po-pretty-format,
|
|
3
3
|
{%- if oca_hooks_matrix_value >= 20 %}
|
|
4
|
-
{%- if not use_ruff %}
|
|
5
4
|
{# Migrated to ruff-odoo ODW8113, ODC8116, ODW8161, ODW8501 and ODC8501 rules #}
|
|
6
5
|
field-string-redundant,
|
|
7
6
|
manifest-superfluous-key,
|
|
8
7
|
prefer-env-translation,
|
|
9
8
|
unused-logger,
|
|
10
9
|
use-header-comments,
|
|
11
|
-
{%- endif %}
|
|
12
10
|
prefer-readme-rst,
|
|
13
11
|
xml-deprecated-qweb-directive-15,
|
|
14
12
|
xml-field-bool-without-eval,
|
|
@@ -25,11 +25,7 @@ exclude: |
|
|
|
25
25
|
)
|
|
26
26
|
default_language_version:
|
|
27
27
|
python: python3
|
|
28
|
-
{%- if use_ruff %}
|
|
29
|
-
node: "26.7.0"
|
|
30
|
-
{%- else %}
|
|
31
28
|
node: "24.13.0"
|
|
32
|
-
{%- endif %}
|
|
33
29
|
repos:
|
|
34
30
|
- repo: https://github.com/OCA/pylint-odoo
|
|
35
31
|
{%- if pylint_matrix_value >= 20 %}
|
|
@@ -75,15 +71,6 @@ repos:
|
|
|
75
71
|
language: python
|
|
76
72
|
pass_filenames: false
|
|
77
73
|
always_run: true
|
|
78
|
-
{%- if use_ruff %}
|
|
79
|
-
- repo: https://github.com/Vauxoo/ruff-odoo-pre-commit
|
|
80
|
-
rev: 0.16.3.33{# b2v-ruff #}
|
|
81
|
-
hooks:
|
|
82
|
-
- id: ruff-check
|
|
83
|
-
name: ruff-odoo optional checks
|
|
84
|
-
args:
|
|
85
|
-
- --config=.config/.ruff-optional.toml
|
|
86
|
-
{%- endif %}
|
|
87
74
|
- repo: https://github.com/PyCQA/flake8
|
|
88
75
|
{%- if flake8_matrix_value >= 20 %}
|
|
89
76
|
rev: 7.3.0
|
|
@@ -100,7 +87,6 @@ repos:
|
|
|
100
87
|
{%- endif %}
|
|
101
88
|
args:
|
|
102
89
|
- --config=.config/.flake8-optional
|
|
103
|
-
{%- if not use_ruff %}
|
|
104
90
|
# B704 (markupsafe_markup_xss) is the only check enabled here and it is migrated to the ruff
|
|
105
91
|
# unsafe-markup-use (S704) selected from .config/.ruff-optional.toml, which reproduces both
|
|
106
92
|
# the "markupsafe_xss allowed_calls" and the "exclude_dirs: tests" options of that file
|
|
@@ -119,8 +105,6 @@ repos:
|
|
|
119
105
|
- --quiet
|
|
120
106
|
# reduce the INFO logger
|
|
121
107
|
require_serial: true
|
|
122
|
-
{%- endif %}
|
|
123
|
-
{%- if not use_ruff %}
|
|
124
108
|
# Every check enabled here has a ruff S rule, so this hook is replaced by the ruff-odoo
|
|
125
109
|
# EXPERIMENTAL one below (see .config/.ruff-experimental.toml)
|
|
126
110
|
- repo: https://github.com/PyCQA/bandit
|
|
@@ -137,19 +121,6 @@ repos:
|
|
|
137
121
|
- --quiet
|
|
138
122
|
# reduce the INFO logger
|
|
139
123
|
require_serial: true
|
|
140
|
-
{%- endif %}
|
|
141
|
-
{%- if use_ruff %}
|
|
142
|
-
- repo: https://github.com/Vauxoo/ruff-odoo-pre-commit
|
|
143
|
-
rev: 0.16.3.33{# b2v-ruff #}
|
|
144
|
-
hooks:
|
|
145
|
-
- id: ruff-check
|
|
146
|
-
name: ruff-odoo EXPERIMENTAL checks (Won't affect CI status)!
|
|
147
|
-
verbose: True # exit-zero needs verbose
|
|
148
|
-
args:
|
|
149
|
-
- --config=.config/.ruff-experimental.toml
|
|
150
|
-
- --exit-zero
|
|
151
|
-
{%- endif %}
|
|
152
|
-
{%- if not use_ruff %}
|
|
153
124
|
# Both experimental checks are migrated to ruff so this hook is replaced by the
|
|
154
125
|
# ruff-odoo EXPERIMENTAL one above (see .config/.ruff-experimental.toml)
|
|
155
126
|
- repo: https://github.com/OCA/pylint-odoo
|
|
@@ -168,4 +139,3 @@ repos:
|
|
|
168
139
|
{%- if pylint_matrix_value >= 20 %}
|
|
169
140
|
- --jobs=3
|
|
170
141
|
{%- endif %}
|
|
171
|
-
{%- endif %}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
exclude: |
|
|
2
|
+
(?x)(
|
|
3
|
+
# NOT INSTALLABLE ADDONS
|
|
4
|
+
# END NOT INSTALLABLE ADDONS
|
|
5
|
+
# Files and folders generated by bots, to avoid loops
|
|
6
|
+
^setup/|/static/description/index\.html$|
|
|
7
|
+
# We don't want to mess with tool-generated files
|
|
8
|
+
.svg$|/tests/([^/]+/)?cassettes/|
|
|
9
|
+
# Maybe reactivate this when all README files include prettier ignore tags?
|
|
10
|
+
^README\.md$|
|
|
11
|
+
# Library files can have extraneous formatting (even minimized)
|
|
12
|
+
/static/(src/)?lib/|
|
|
13
|
+
# Repos using Sphinx to generate docs don't need prettying
|
|
14
|
+
^docs/_templates/.*\.html$|
|
|
15
|
+
# You don't usually want a bot to modify your legal texts
|
|
16
|
+
(LICENSE.*|COPYING.*)|
|
|
17
|
+
(\.travis\.yml|\.gitlab\-ci\.yml|\.pre\-commit\-config*\.yaml)|
|
|
18
|
+
# It was ignored from original MQT since that there is not init file
|
|
19
|
+
(/migrations/1[0-4])|
|
|
20
|
+
{% if exclude_lint_regex -%}
|
|
21
|
+
{{ "# EXCLUDE_LINT" }}
|
|
22
|
+
{{ exclude_lint_regex }}
|
|
23
|
+
{%- endif %}
|
|
24
|
+
(/doc/|/docs/)
|
|
25
|
+
)
|
|
26
|
+
default_language_version:
|
|
27
|
+
python: python3
|
|
28
|
+
node: "24.13.0"
|
|
29
|
+
repos:
|
|
30
|
+
- repo: https://github.com/PyCQA/flake8
|
|
31
|
+
{%- if flake8_matrix_value >= 20 %}
|
|
32
|
+
rev: 7.3.0
|
|
33
|
+
{%- else %}
|
|
34
|
+
rev: 6.1.0
|
|
35
|
+
{%- endif %}
|
|
36
|
+
hooks:
|
|
37
|
+
- id: flake8
|
|
38
|
+
name: flake8 mandatory checks
|
|
39
|
+
args:
|
|
40
|
+
- --config=.config/.flake8
|
|
41
|
+
- repo: https://github.com/OCA/pylint-odoo
|
|
42
|
+
{%- if pylint_matrix_value >= 20 %}
|
|
43
|
+
rev: v10.0.11{# b2v-pylint #}
|
|
44
|
+
{%- else %}
|
|
45
|
+
rev: v9.3.24
|
|
46
|
+
{%- endif %}
|
|
47
|
+
hooks:
|
|
48
|
+
- id: pylint_odoo
|
|
49
|
+
name: pylint mandatory checks
|
|
50
|
+
args:
|
|
51
|
+
- --rcfile=.config/.pylintrc
|
|
52
|
+
- --disable={{ pylint_disable_checks | join(",") if pylint_disable_checks else "R0000" }}
|
|
53
|
+
{%- if pylint_matrix_value >= 20 %}
|
|
54
|
+
- --jobs=3
|
|
55
|
+
{%- endif %}
|
|
56
|
+
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
57
|
+
rev: v9.39.1
|
|
58
|
+
hooks:
|
|
59
|
+
- id: eslint
|
|
60
|
+
name: javascript mandatory checks
|
|
61
|
+
args:
|
|
62
|
+
- --color
|
|
63
|
+
- --config=.config/.eslintrc.config.mjs
|
|
64
|
+
- repo: local
|
|
65
|
+
hooks:
|
|
66
|
+
- id: name-non-ascii
|
|
67
|
+
name: Use only ASCII (no accents or special characters) for filenames and directory names
|
|
68
|
+
description: It may raise errors on OS without locale settings configured
|
|
69
|
+
entry: Use only ASCII (no accents or special characters) for filenames and directory names
|
|
70
|
+
language: fail
|
|
71
|
+
files: '[^\x00-\x7F]'
|
|
72
|
+
- id: vx-check-deactivate
|
|
73
|
+
name: deactivate.jinja and neutralize.sql syntax check.
|
|
74
|
+
description: Validate deactivate.jinja and neutralize.sql files' syntax.
|
|
75
|
+
entry: vx-check-deactivate
|
|
76
|
+
args: []
|
|
77
|
+
language: python
|
|
78
|
+
types: [text]
|
|
79
|
+
files: (^deactivate\.jinja$|/data/neutralize\.sql$)
|
|
80
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
81
|
+
{%- if pre_commit_matrix_value >= 20 %}
|
|
82
|
+
rev: v6.0.0
|
|
83
|
+
{%- else %}
|
|
84
|
+
rev: v4.5.0
|
|
85
|
+
{%- endif %}
|
|
86
|
+
hooks:
|
|
87
|
+
- id: check-case-conflict
|
|
88
|
+
- id: check-docstring-first
|
|
89
|
+
- id: check-executables-have-shebangs
|
|
90
|
+
- id: check-json
|
|
91
|
+
- id: check-merge-conflict
|
|
92
|
+
# exclude files where underlines are not distinguishable from merge conflicts
|
|
93
|
+
exclude: /README\.rst$|^docs/.*\.rst$
|
|
94
|
+
- id: check-symlinks
|
|
95
|
+
- id: check-xml
|
|
96
|
+
# Migrated to ruff: forgotten-debug-statement (T100 from .config/.ruff.toml)
|
|
97
|
+
- id: debug-statements
|
|
@@ -10,12 +10,6 @@ py-version={{ py_version }}
|
|
|
10
10
|
{%- endif %}
|
|
11
11
|
|
|
12
12
|
[ODOOLINT]
|
|
13
|
-
{% if use_ruff -%}
|
|
14
|
-
# The checks using these options (license-allowed, manifest-required-author and
|
|
15
|
-
# manifest-deprecated-key) are migrated to ruff, so the values actually running are the
|
|
16
|
-
# [lint.odoo] ones of .config/.ruff-optional.toml, kept here in sync for the external scripts
|
|
17
|
-
# replacing this section and for the configuration without ruff
|
|
18
|
-
{% endif -%}
|
|
19
13
|
license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,
|
|
20
14
|
GPL-3,GPL-3 or any later version,LGPL-3,
|
|
21
15
|
Other OSI approved licence,Other proprietary,
|
|
@@ -36,8 +30,7 @@ enable=deprecated-method,
|
|
|
36
30
|
deprecated-pragma,
|
|
37
31
|
use-implicit-booleaness-not-comparison-to-zero,
|
|
38
32
|
use-symbolic-message-instead,
|
|
39
|
-
useless-parent-delegation
|
|
40
|
-
{%- if not use_ruff %},
|
|
33
|
+
useless-parent-delegation,
|
|
41
34
|
# The following checks are migrated to ruff when it is enabled
|
|
42
35
|
# They keep the same optional level running from .config/.ruff-optional.toml, except the ones
|
|
43
36
|
# annotated as "mandatory .ruff.toml": those were also enabled by the "enable=all" of
|
|
@@ -93,7 +86,6 @@ enable=deprecated-method,
|
|
|
93
86
|
use-implicit-booleaness-not-comparison-to-string, # ruff PLC1901
|
|
94
87
|
use-vim-comment, # ruff ODW8202 (autofix .ruff-autofix.toml)
|
|
95
88
|
website-manifest-key-not-valid-uri # ruff ODW8114
|
|
96
|
-
{%- endif %}
|
|
97
89
|
|
|
98
90
|
[REPORTS]
|
|
99
91
|
msg-template={path}:{line}:{column}: ({symbol}) {msg}
|