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: pylint-odoo v8 configuration options ignored #204

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

theangryangel
Copy link
Member

Under OCA/pylint-odoo#426, underscores were replaced with dashes for configuration options, when pylint-odoo was bumped in oca-addons-repo-template#198 this change was not taken into account.

I think this is the best way to deal with this?

@theangryangel
Copy link
Member Author

I’m heading out with family for the afternoon.

I’ll look at patching the failing test this evening/tomorrow.

@pedrobaeza
Copy link
Member

pedrobaeza commented Aug 12, 2023

Is OCA v16 repositories using pylint-odoo v8?

@theangryangel
Copy link
Member Author

It was included under https://github.com/OCA/oca-addons-repo-template/pull/198/files.
(Assuming im not making the second misread of the week 😅)

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

One of the tests is red though

@theangryangel
Copy link
Member Author

I’ll get the tests adjusted in the morning to account for it 👍

…s for configuration options, when pylilnt-odoo was bumped in oca-addons-repo-template#198 this change was not taken into account
@theangryangel
Copy link
Member Author

Hopefully the test changes are appropriate :)

I assume Python 2.7 test failure is to be ignored until #200 is resolved?

@pedrobaeza
Copy link
Member

Yes, that one is broken for now, but we can manually merge having it red. Merging now, but a new release should be done. Please @sbidoul / @yajo

@pedrobaeza pedrobaeza merged commit ecc09a2 into OCA:master Aug 13, 2023
7 of 8 checks passed
@yajo
Copy link
Member

yajo commented Aug 21, 2023

@pedrobaeza
Copy link
Member

Thanks!

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={{ odoo_version }}
{%- endif %}
Copy link
Member

Choose a reason for hiding this comment

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

This solution sounds a bit awkward to me. Summoning @moylop260 here: is this the right way to do this? Did pylint-odoo 8 actually change the option names?

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on OCA/pylint-odoo#465 thats what I have understood from moylop260 and observed :) If I've made a huge mistake apologies :)

As for the fix I copied the version checking pattern that was being used elsewhere. For changing the tests I explicitly checked the pylint-odoo version. I did toy with doing that, but elected to try and follow the same pattern. I don't mind revisiting this if there's a preferred change.

Copy link
Member

Choose a reason for hiding this comment

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

@theangryangel thanks for the explanation (which I should have found myself, had I read your OP carefully :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We're all busy people :) It's easily done, anything I can do to try and make life easier tho :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for take care about here

BTW I forgot to update this template after that release

@celm1990
Copy link
Sponsor Contributor

Hi guys,

I am confused by these changes, for example, I created a module with inconsistencies:

  • Incorrect version(16.0 instead of 17.0)
  • Untranslated text

However, pylint with version v8.0.19(used by this repo for Odoo V17.0) does not fail with it.
image

I tested with v8.0.5 and now some validations are apllied
image

However manifest-version-format does not fail, It is necessary to change dashes to underscores(as before this change), and then it works.
image

So, for pylint-odoo v8.0.5 these changes are not valid, they must be valid only from v0.8.6+ but it's not working neither (:
image

Can someone please review and provide your comments?

For pylint-odoo v8.0.6+ how should it be configured to work?

@theangryangel
Copy link
Member Author

theangryangel commented Nov 17, 2023

I've had a quick 5 minute check, and agree it is broken, but it's broken specifically on the 17.0 version of the template.

However, right now I'm equally confused @celm1990 :(

If I take a 16.0 branch, recopy it as 17.0 it breaks. If I put it back to 16.0 it works.

I've got a couple of calls I need to make this morning, but I'll try and find the time to diagnose further.

Edit: I've just seen OCA/pylint-odoo#477. Standing down :)

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.

6 participants