-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare pre-commit-config for odoo v14 #8
Conversation
- Move linters after formatters. It makes no sense to lint code that is going to be reformatted. - Store revisions in variables and use them. - Where there are more changes than just the revisions, add needed logic. - Update dependencies. - Add v14 to CI.
3bb1986
to
0662c5c
Compare
One little thing regarding the pre-commit stuff: if there are plans for fixing OCA/oca-github-bot#55 some day, different pre-commit hook versions across module branches would dificult that a lot. For example, code formatted with black 19.10b0 and 20.8b1 is quite different, so doing automatic fw/bw ports becomes much harder. So, maybe we need to reconsider the decision of freezing hooks per odoo version, and, instead, update all of them at once, regardless of odoo version (in this context, this means branches 13.0 and later only). The obvious problem of that decision would be that some open PRs that were green before the pre-commit update could become ❌ once merged. That has 2 possible solutions:
This PR is currently implementing the current decision of pre-commit hook per odoo version, and I'm not saying it's the right moment to change that. It's not a decision that we have to take right now because OCA/oca-github-bot#55 is far from fixed, but I'm just commenting it because we should keep this in mind. |
|
||
{#- Older versions that differ a lot have their own hardcoded templates for readability #} | ||
{%- if odoo_version < 14 %} | ||
{%- include "version-specific/%s/.pre-commit-config.yaml" % odoo_version %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @yajo for all this hard work.
This PR has the |
Thank you too, merging then. 😊 |
@Tecnativa TT22772