pass
-Future = asyncio.Future # noqa
+Future = asyncio.Future
FUTURES = (futures.Future, Future)
def inner(f: Any) -> None:
# Break a reference cycle to speed GC.
- f = None # noqa
+ f = None # noqa: F841
self.run()
self.io_loop.add_future(self.future, inner)
)
if typing.TYPE_CHECKING:
- from typing import Deque # noqa
- from asyncio import Future # noqa
- import unittest # noqa
+ from typing import Deque # noqa: F401
+ from asyncio import Future # noqa: F401
+ import unittest # noqa: F401
# RFC 7230 section 3.5: a recipient MAY recognize a single LF as a line
chain_future,
future_set_exc_info,
future_add_done_callback,
-) # noqa: E501
+)
from tornado.log import app_log
from tornado.util import Configurable, TimeoutError, import_object
ctypes.wintypes.HANDLE,
ctypes.wintypes.DWORD,
ctypes.wintypes.DWORD,
-) # noqa: E501
+)
SetHandleInformation.restype = ctypes.wintypes.BOOL
HANDLE_FLAG_INHERIT = 0x00000001
)
from tornado.util import unicode_type
-from typing import List, Tuple, Union, Dict, Any # noqa
+from typing import List, Tuple, Union, Dict, Any # noqa: F401
linkify_tests = [
# (input, linkify_kwargs, expected_output)
HTTPMessageDelegate,
HTTPServerConnectionDelegate,
ResponseStartLine,
-) # noqa: E501
+)
from tornado.iostream import IOStream
from tornado.locks import Event
from tornado.log import gen_log
AsyncTestCase,
ExpectLog,
gen_test,
-) # noqa: E501
+)
from tornado.test.util import skipOnTravis
from tornado.web import Application, RequestHandler, stream_request_body
bind_unused_port,
ExpectLog,
gen_test,
-) # noqa: E501
+)
from tornado.test.util import skipIfNonUnix, refusing_port, skipPypy3V58
from tornado.web import RequestHandler, Application
import errno
HTTPMessageDelegate,
HTTPServerConnectionDelegate,
ResponseStartLine,
-) # noqa: E501
+)
from tornado.routing import (
HostMatches,
PathMatches,
from tornado.web import Application, HTTPError, RequestHandler
from tornado.wsgi import WSGIContainer
-import typing # noqa
+import typing # noqa: F401
class BasicRouter(Router):
# `python3.4 -W error -c 'import asyncio; asyncio.get_event_loop()'`
# would generate a warning.
warnings.filterwarnings(
- "ignore", category=ResourceWarning, module=r"asyncio\..*" # noqa: F821
+ "ignore", category=ResourceWarning, module=r"asyncio\..*"
)
logging.getLogger("tornado.access").setLevel(logging.CRITICAL)
CountdownHandler,
HelloWorldHandler,
RedirectHandler,
-) # noqa: E501
+)
from tornado.test import httpclient_test
from tornado.testing import (
AsyncHTTPTestCase,
recursive_unicode,
native_str,
to_basestring,
-) # noqa: E501
+)
from tornado.httpclient import HTTPClientError
from tornado.httputil import format_timestamp
from tornado.iostream import IOStream
from tornado.web import Application, RequestHandler
try:
- import tornado.websocket # noqa
+ import tornado.websocket # noqa: F401
from tornado.util import _websocket_mask_python
except ImportError:
# The unittest module presents misleading errors on ImportError
if typing.TYPE_CHECKING:
# Additional imports only used in type comments.
# This lets us make these imports lazy.
- import datetime # noqa
- from types import TracebackType # noqa
- from typing import Union # noqa
- import unittest # noqa
+ import datetime # noqa: F401
+ from types import TracebackType # noqa: F401
+ from typing import Union # noqa: F401
+ import unittest # noqa: F401
# Aliases for types that are spelled differently in different Python
# versions. bytes_type is deprecated and no longer used in Tornado