-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
[ADD] missing-import-error, missing-manifest-dependency #68
Conversation
# self-odoo | ||
'odoo', 'openerp', | ||
# Known external packages of odoo | ||
'PIL', 'babel', 'dateutil', 'decorator', 'docutils', 'jinja2', 'ldap', |
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.
Shouldn't this be caught from the requirements.txt of Odoo?
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.
That was my first option
- But for many cases the
pip install package
is different toimport package
But I have extracted the packages running this check from odoo 8.0, 9.0 and master:
PYTHONPATH=~/build/OCA/pylint-odoo pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" -d all -e missing-import-error --load-plugins=pylint_odoo odoo/addons/* odoo/openerp/addons/* odoo odoo/openerp -rn
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.
Sorry, I didn't see this. Anyways, we need to control a different list depending versions. What about including this on the specific cfg for each 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.
(Don't worry.)
Yes, that is the intention.
Here we have a "Default" value for initial assignation from configuration file.
But we can create a configuration file by each version with this value but is from running step MQT configuration files of pylint
@@ -229,15 +259,71 @@ def check_odoo_relative_import(self, node): | |||
self.add_message('odoo-addons-relative-import', node=node, | |||
args=(self.odoo_module_name)) | |||
|
|||
@utils.check_messages('odoo-addons-relative-import') | |||
@staticmethod | |||
def _is_absoulte_import(node, name): |
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.
s/absoulte/absolute
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.
fixed
thanks!
162f7b1
to
90739a6
Compare
👍 |
1 similar comment
👍 |
d3dd205
to
e06171e
Compare
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.
👍
Could we merge it? |
You didn't answer me about the possibility of extracting known libraries from requirements.txt so that we can correctly parse them when this changes through versions. |
Are you talking about my last answer #68 (comment)? |
Thanks as always for your good job. |
Thanks for your review, feedback and merge! |
[ADD] missing-import-error, missing-manifest-dependency
[ADD] missing-import-error, missing-manifest-dependency
* Merge pull request OCA#68 from vauxoo-dev/master-oca-whlst-pack-moy3 * [REF] import-error: Increase test expected
Based on external dependencies guideline
Inspired from OCA/maintainer-tools#224
FYI the variable
DFLT_IMPORT_NAME_WHITELIST
was filled running this check on odoo/odoo#master..odoo/odoo#8.0PYTHONPATH=~/build/OCA/pylint-odoo pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" -d all -e missing-import-error --load-plugins=pylint_odoo odoo/addons/* odoo/openerp/addons/* odoo odoo/openerp -rn