Skip to content
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

[FIX] test-folder-imported: check if node has a modname as attribute #315

Merged

Conversation

fernandahf
Copy link
Contributor

@fernandahf fernandahf commented Jan 19, 2021

Description of the issue/feature this PR addresses:

In python versions above 3.5, following error occurs when try to get modname from node.

AttributeError: 'Import' object has no attribute 'modname'

Current behavior before PR:
Error caused by try to get modname from node from Import object.

Desired behavior after PR is merged:
No errors shown when try to get modname from node.

Fix #318

Copy link
Contributor

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title: "like" -> "as".

"Like" is used to compare things or to indicate they're similar, while "as" may be used to indicate something is used in place of, or fulfilling the role of.

pylint_odoo/checkers/modules_odoo.py Outdated Show resolved Hide resolved
@fernandahf fernandahf changed the title [FIX] test-folder-imported: check if node has a modname like attribute [FIX] test-folder-imported: check if node has a modname as attribute Jan 19, 2021
@fernandahf fernandahf force-pushed the master-fix-check-folder-tests-imported-fer branch 2 times, most recently from ab6d7ca to 4aefaba Compare January 19, 2021 16:18
@fernandahf fernandahf force-pushed the master-fix-check-folder-tests-imported-fer branch from 4aefaba to 7a465f0 Compare January 19, 2021 16:24
In python versions above 3.5, an error occurs when try to get 'modname' from node.
@fernandahf fernandahf force-pushed the master-fix-check-folder-tests-imported-fer branch from 7a465f0 to 7dd59fa Compare January 19, 2021 16:52
@moylop260 moylop260 merged commit 1b9018e into OCA:master Jan 19, 2021
@moylop260 moylop260 deleted the master-fix-check-folder-tests-imported-fer branch January 19, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError raised when running odoo_pylint checks
3 participants