Opened 9 years ago

Closed 9 years ago

#26125 closed Cleanup/optimization (fixed)

Fix E731 flake warnings (do not assign a lambda expression, use a def)

Reported by: Tim Graham Owned by: Mahendra Yadav
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

A patch is attached to get started. Just run flake8 in the root clone directory to see the errors to fix.

If we wanted to keep the "one-line" aspect, something like
identity = lambda x: x becomes def identity(x): return x though I think putting the return statement on a separate line is less awkward to read. Other opinions welcome.

Attachments (1)

26125.diff (2.2 KB ) - added by Tim Graham 9 years ago.

Download all attachments as: .zip

Change History (7)

by Tim Graham, 9 years ago

Attachment: 26125.diff added

comment:1 by Anderson Resende, 9 years ago

Owner: changed from nobody to Anderson Resende
Status: newassigned

comment:2 by Mahendra Yadav, 9 years ago

Owner: changed from Anderson Resende to Mahendra Yadav

comment:3 by Tim Graham, 9 years ago

@andersonresende, userimack is a new contributor who started this ticket but forgot to assign it. Sorry for that.

comment:4 by Tim Graham, 9 years ago

Has patch: set
Patch needs improvement: set

PR (not all errors are fixed yet). Please uncheck "Patch needs improvement" when all errors are resolved.

comment:5 by Mahendra Yadav, 9 years ago

Patch needs improvement: unset

comment:6 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 60586dd7:

Fixed #26125 -- Fixed E731 flake warnings.

Note: See TracTickets for help on using tickets.
Back to Top