#26125: Fix E731 flake warnings (do not assign a lambda expression, use a def)
------------------------------------------------+------------------------
               Reporter:  timgraham             |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Core (Other)          |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Accepted              |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  1
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26125>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.793a7db0fbb8e854625cce40355fe7dc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to