Opened 10 years ago
Closed 10 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)
Change History (7)
by , 10 years ago
| Attachment: | 26125.diff added |
|---|
comment:1 by , 10 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 10 years ago
| Owner: | changed from to |
|---|
comment:3 by , 10 years ago
comment:4 by , 10 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 , 10 years ago
| Patch needs improvement: | unset |
|---|
Note:
See TracTickets
for help on using tickets.
@andersonresende, userimack is a new contributor who started this ticket but forgot to assign it. Sorry for that.