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] remove cause of pylint cell-var-from-loop #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spenced
Copy link

@spenced spenced commented Nov 19, 2018

Signed-off-by: David Spence [email protected]

@spenced spenced requested a review from mcb30 November 19, 2018 18:33

# Get corresponding sale report record
sale_report = sale_reports.filtered(lambda x: x.sale_id == sale)
sale_report = sale_reports.filtered(lambda x, s=sale: x.sale_id == s)
Copy link
Owner

Choose a reason for hiding this comment

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

Looks sensible. Maybe "lambda x, sale=sale: x.sale_id == sale" to make it more obvious why the parameter default is being specified?

There are a few other points within the codebase that have the same pattern of disabling the spurious pylint warning: if fixing this one, then it probably makes sense to fix the others at the same time.

Lastly: the commit log message should include "edi_sale:" to comply with the Odoo standard.

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.

2 participants