]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
fix new E741 detected cases 2861/head
authormarc <Marc>
Thu, 14 May 2020 11:00:28 +0000 (13:00 +0200)
committermarc <Marc>
Thu, 14 May 2020 11:00:28 +0000 (13:00 +0200)
tornado/http1connection.py
tornado/web.py

index fd4be76e991e75f0d9116ee6c6fa277214377c32..7ac88d3b48c98b94b34103d9caeb5c524321eaec 100644 (file)
@@ -448,7 +448,7 @@ class HTTP1Connection(httputil.HTTPConnection):
         header_lines = (
             native_str(n) + ": " + native_str(v) for n, v in headers.get_all()
         )
-        lines.extend(l.encode("latin1") for l in header_lines)
+        lines.extend(line.encode("latin1") for line in header_lines)
         for line in lines:
             if b"\n" in line:
                 raise ValueError("Newline in header: " + repr(line))
index 604aeb361d0a84bed42ef1c79d94917add253489..bb98b94b5fdceef468f01b5c10f461dee7c048bf 100644 (file)
@@ -1300,7 +1300,7 @@ class RequestHandler(object):
                 locales.append((parts[0], score))
             if locales:
                 locales.sort(key=lambda pair: pair[1], reverse=True)
-                codes = [l[0] for l in locales]
+                codes = [loc[0] for loc in locales]
                 return locale.get(*codes)
         return locale.get(default)