]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
new flake8 warning fixes for 5.1 branch 2590/head
authorPierce Lopez <pierce.lopez@gmail.com>
Mon, 11 Feb 2019 03:13:44 +0000 (22:13 -0500)
committerPierce Lopez <pierce.lopez@gmail.com>
Mon, 11 Feb 2019 03:13:44 +0000 (22:13 -0500)
due to flake8 / pyflakes / pycodestyle updates

.flake8
tornado/test/web_test.py
tornado/util.py
tornado/web.py

diff --git a/.flake8 b/.flake8
index 1c2c768d1f5011d0899bfa55e70fe7ce6cb988a4..803d06d2083b5f9b694f1be480c4fc864d539613 100644 (file)
--- a/.flake8
+++ b/.flake8
@@ -10,4 +10,6 @@ ignore =
     E402,
     # E722 do not use bare except
     E722,
+    # W504 line break after binary operator
+    W504,
 doctests = true
index 16938c4239cee9e54f0e120d3cc64695bf7ae968..b1ae4747cfa5fa3b7a4a9803d5d7f20a37ed0ed0 100644 (file)
@@ -398,7 +398,7 @@ class AuthRedirectTest(WebTestCase):
                               follow_redirects=False)
         self.assertEqual(response.code, 302)
         self.assertTrue(re.match(
-            'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',
+            r'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',
             response.headers['Location']), response.headers['Location'])
 
 
index a42ebebe3748a8fe7b0d6d5e43e65ff8a0ea0685..151b0d8844f393c7a66710c53ae6af4b94cc7c3a 100644 (file)
@@ -59,7 +59,7 @@ else:
     import datetime  # noqa
     import types  # noqa
     from typing import Any, AnyStr, Union, Optional, Dict, Mapping  # noqa
-    from typing import Tuple, Match, Callable  # noqa
+    from typing import List, Tuple, Match, Callable  # noqa
 
     if PY3:
         _BaseString = str
@@ -252,7 +252,7 @@ _re_unescape_pattern = re.compile(r'\\(.)', re.DOTALL)
 
 def re_unescape(s):
     # type: (str) -> str
-    """Unescape a string escaped by `re.escape`.
+    r"""Unescape a string escaped by `re.escape`.
 
     May raise ``ValueError`` for regular expressions which could not
     have been produced by `re.escape` (for example, strings containing
index 6760b0b9a166c79ccbbbf9abe1c0c7994bdd4384..4340b16f0ae013ffc1028bf0df4902316340d95f 100644 (file)
@@ -1887,7 +1887,7 @@ class _ApplicationRouter(ReversibleRuleRouter):
 
 
 class Application(ReversibleRouter):
-    """A collection of request handlers that make up a web application.
+    r"""A collection of request handlers that make up a web application.
 
     Instances of this class are callable and can be passed directly to
     HTTPServer to serve the application::