[IMP] Update pre-commit to current OCA standards, dob compatible#1
[IMP] Update pre-commit to current OCA standards, dob compatible#1dreispt wants to merge 1 commit intoinitOS:masterfrom
Conversation
|
cc @fkantelberg |
fkantelberg
left a comment
There was a problem hiding this comment.
I have to test it but some of these changes seem breaking. This is a general template for all kind of Odoo versions. The update for the pre-commit should be tested as well.
odoo/.pylintrc
Outdated
| manifest_required_keys=license | ||
| manifest_deprecated_keys=description,active | ||
| license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 | ||
| valid_odoo_versions=15.0 |
There was a problem hiding this comment.
We can't copy the file from the OCA 1 by 1. Internal manifests don't need to include OCA as author and the valid odoo version isn't always 15.0 because the template is used for all kind of Odoo versions.
odoo/.pylintrc-mandatory
Outdated
| manifest_required_keys=license | ||
| manifest_deprecated_keys=description,active | ||
| license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 | ||
| valid_odoo_versions=15.0 |
354ebf9 to
319fbec
Compare
319fbec to
f76d19e
Compare
fkantelberg
left a comment
There was a problem hiding this comment.
I was able to test it a bit deeper. The additional pylint tests are quite helpful but I guess the readme shouldn't be required for this project because only internal modules are checked.
Additionally the black repinning causes heavy issues.
| invalid-commit, | ||
| missing-manifest-dependency, | ||
| missing-newline-extrafiles, | ||
| missing-readme, |
There was a problem hiding this comment.
This one is duplicated and breaking because we don't want to enforce readme's for internal modules. Potentially some of the deprecated warnings can break older installations.
| invalid-commit, | ||
| manifest-maintainers-list, | ||
| missing-newline-extrafiles, | ||
| missing-readme, |
| - --remove-unused-variables | ||
| - repo: https://github.com/psf/black | ||
| rev: 20.8b1 | ||
| rev: 21.9b0 |
There was a problem hiding this comment.
This black version has currently heavy problems with the current click version. I guess some of the CI for the OCA might be also influenced by this.
Traceback (most recent call last):
File "/home/florian/.cache/pre-commit/repod82ojeyu/py_env-python3/bin/black", line 8, in <module>
sys.exit(patched_main())
File "/home/florian/.cache/pre-commit/repod82ojeyu/py_env-python3/lib/python3.8/site-packages/black/__init__.py", line 1282, in patched_main
patch_click()
File "/home/florian/.cache/pre-commit/repod82ojeyu/py_env-python3/lib/python3.8/site-packages/black/__init__.py", line 1268, in patch_click
from click import _unicodefun # type: ignore
ImportError: cannot import name '_unicodefun' from 'click' (/home/florian/.cache/pre-commit/repod82ojeyu/py_env-python3/lib/python3.8/site-packages/click/__init__.py)
There was a problem hiding this comment.
What about this @dreispt @azoellner @fkantelberg is that stale or can this be fixed and merged somewhen soon
No description provided.