From: marc Date: Thu, 14 May 2020 11:00:28 +0000 (+0200) Subject: fix new E741 detected cases X-Git-Tag: v6.1.0b1~28^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2861%2Fhead;p=thirdparty%2Ftornado.git fix new E741 detected cases --- diff --git a/tornado/http1connection.py b/tornado/http1connection.py index fd4be76e9..7ac88d3b4 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -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)) diff --git a/tornado/web.py b/tornado/web.py index 604aeb361..bb98b94b5 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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)