未验证 提交 97d65996 编写于 作者: B Ben Darnell 提交者: GitHub

Merge pull request #2590 from ploxiln/flake8_upd_b51

new flake8 warning fixes for 5.1 branch
......@@ -10,4 +10,6 @@ ignore =
E402,
# E722 do not use bare except
E722,
# W504 line break after binary operator
W504,
doctests = true
......@@ -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'])
......
......@@ -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
......
......@@ -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::
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册