new flake8 warning fixes for 5.1 branch

due to flake8 / pyflakes / pycodestyle updates
This commit is contained in:
Pierce Lopez 2019-02-10 22:13:44 -05:00
parent cc2cf078a3
commit 0a1581c11b
4 changed files with 6 additions and 4 deletions

View File

@ -10,4 +10,6 @@ ignore =
E402,
# E722 do not use bare except
E722,
# W504 line break after binary operator
W504,
doctests = true

View 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'])

View 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

View 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::