[REF] pylintrc-mandatory: enable deprecated module checks#359
Open
moylop260 wants to merge 1 commit into
Open
Conversation
Enable pylint's deprecated-module check in the mandatory rcfile used by the blocking pre-commit hook for Odoo 13.0 and newer. This makes generated OCA repositories fail fast when forbidden imports such as pdb, pudb, ipdb, or bs4 are introduced, instead of leaving the check only in the optional IDE-oriented pylint configuration. For Odoo 20.0 and newer, also mark pytz as deprecated so repositories generated from this template follow the upstream direction taken in Odoo saas-19.1. That branch removed pytz usage in Odoo commit 6fdb36716aac5d2b084fb0faa94ccb2f3ee7f99c: odoo/odoo@6fdb367 Keep the scope limited to 13.0+ templates, where src/.pylintrc-mandatory.jinja is the source used to render both .pylintrc-mandatory and the inherited optional .pylintrc. Legacy <=12.0 templates are intentionally left unchanged. Extend the bootstrap test to assert the rendered [IMPORTS] section and the version-specific pytz addition.
Contributor
Author
|
@sbidoul @hbrunn @StefanRijnhart Could you review it, please? Odoo v19.1 have deleted pytz dependency A faster fail is enabling this module as deprecated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable pylint's deprecated-module check in the mandatory rcfile used by the blocking pre-commit hook for Odoo 13.0 and newer.
This makes generated OCA repositories fail fast when forbidden imports such as pdb, pudb, ipdb, or bs4 are introduced, instead of leaving the check only in the optional IDE-oriented pylint configuration.
For Odoo 20.0 and newer, also mark pytz as deprecated so repositories generated from this template follow the upstream direction taken in Odoo saas-19.1.
That branch removed pytz usage in Odoo commit:
Keep the scope limited to 13.0+ templates, where src/.pylintrc-mandatory.jinja is the source used to render both .pylintrc-mandatory and the inherited optional .pylintrc. Legacy <=12.0 templates are intentionally left unchanged.
Extend the bootstrap test to assert the rendered [IMPORTS] section and the version-specific pytz addition.