]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
*: Remove some obsolete linter "noqa" cruft
authorBen Darnell <ben@bendarnell.com>
Sun, 7 Oct 2018 03:55:32 +0000 (23:55 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 7 Oct 2018 03:55:32 +0000 (23:55 -0400)
14 files changed:
tornado/concurrent.py
tornado/gen.py
tornado/httputil.py
tornado/ioloop.py
tornado/platform/windows.py
tornado/test/escape_test.py
tornado/test/httpserver_test.py
tornado/test/iostream_test.py
tornado/test/routing_test.py
tornado/test/runtests.py
tornado/test/simple_httpclient_test.py
tornado/test/web_test.py
tornado/test/websocket_test.py
tornado/util.py

index ee5ca40a013ff085bafd2ab744d937533b614a8e..3c65d9a35d9c4d45567dc65e0fc39eabffddd50e 100644 (file)
@@ -44,7 +44,7 @@ class ReturnValueIgnoredError(Exception):
     pass
 
 
-Future = asyncio.Future  # noqa
+Future = asyncio.Future
 
 FUTURES = (futures.Future, Future)
 
index 27b504391dcbbbe0fa9ab4c36a7e85fa9b7f7447..e2c77d998a53ec6dc818c81803c554cf7ffd78d0 100644 (file)
@@ -784,7 +784,7 @@ class Runner(object):
 
             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)
index e3d63857b5e1b93e447fd5eba35f08d530294009..cb5142d548e8242651e2f25f34a20bedd8073bee 100644 (file)
@@ -57,9 +57,9 @@ from typing import (
 )
 
 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
index 84c04fcd2921da39a700fa187c53c9d6749be6b3..444af4e85245ee180d50ae9acef5e791677e1c1b 100644 (file)
@@ -47,7 +47,7 @@ from tornado.concurrent import (
     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
 
index 82f0118cbee9c4e6d26552fa23a0c3256f44c1ce..ddbde20cc6d47e910925565086929a62558c501c 100644 (file)
@@ -10,7 +10,7 @@ SetHandleInformation.argtypes = (
     ctypes.wintypes.HANDLE,
     ctypes.wintypes.DWORD,
     ctypes.wintypes.DWORD,
-)  # noqa: E501
+)
 SetHandleInformation.restype = ctypes.wintypes.BOOL
 
 HANDLE_FLAG_INHERIT = 0x00000001
index 06c043aacd70b3b8886e470b70406f1314132532..d8f95e426e27dcbadacaf463010613df27459f15 100644 (file)
@@ -15,7 +15,7 @@ from tornado.escape import (
 )
 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)
index 6f7f2a50036c389b022706caf4bdf5258f0e825d..8a2e03a7f0cffb9bf8276000955e6b1e36f61b1e 100644 (file)
@@ -16,7 +16,7 @@ from tornado.httputil import (
     HTTPMessageDelegate,
     HTTPServerConnectionDelegate,
     ResponseStartLine,
-)  # noqa: E501
+)
 from tornado.iostream import IOStream
 from tornado.locks import Event
 from tornado.log import gen_log
@@ -28,7 +28,7 @@ from tornado.testing import (
     AsyncTestCase,
     ExpectLog,
     gen_test,
-)  # noqa: E501
+)
 from tornado.test.util import skipOnTravis
 from tornado.web import Application, RequestHandler, stream_request_body
 
index db02ae9ee86460d1aab6f5afe52fd90e3e45defa..413141a02bba453025501bcb61ec1e1fa3dd7b33 100644 (file)
@@ -20,7 +20,7 @@ from tornado.testing import (
     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
index c9cb50e65816b2685b58b1e3f51ec58fa45f09e7..fc75d23e00f447b7982467ad2182f3ef196fe856 100644 (file)
@@ -15,7 +15,7 @@ from tornado.httputil import (
     HTTPMessageDelegate,
     HTTPServerConnectionDelegate,
     ResponseStartLine,
-)  # noqa: E501
+)
 from tornado.routing import (
     HostMatches,
     PathMatches,
@@ -28,7 +28,7 @@ from tornado.testing import AsyncHTTPTestCase
 from tornado.web import Application, HTTPError, RequestHandler
 from tornado.wsgi import WSGIContainer
 
-import typing  # noqa
+import typing  # noqa: F401
 
 
 class BasicRouter(Router):
index 9c0fffe4e2edfdf56949754b15560d09eaa539ce..83711cc802acf98ac1aaaf7c4773724086276e37 100644 (file)
@@ -150,7 +150,7 @@ def main():
         # `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)
index cf14dce408ce08d94937d864e974802cb55e719a..ed399ae0563068b90730775a876a3966e0e6518f 100644 (file)
@@ -30,7 +30,7 @@ from tornado.test.httpclient_test import (
     CountdownHandler,
     HelloWorldHandler,
     RedirectHandler,
-)  # noqa: E501
+)
 from tornado.test import httpclient_test
 from tornado.testing import (
     AsyncHTTPTestCase,
index b1f707b376038e5e07387539c630ba08808760b7..87738ba3c7ba673fb4d83fb6f1d2619e02ac2448 100644 (file)
@@ -7,7 +7,7 @@ from tornado.escape import (
     recursive_unicode,
     native_str,
     to_basestring,
-)  # noqa: E501
+)
 from tornado.httpclient import HTTPClientError
 from tornado.httputil import format_timestamp
 from tornado.iostream import IOStream
index 914c7cc063c6c2cf20ba7488daf89fdb94354d45..704828e3ed28245d031ae69042dcb384e70314e2 100644 (file)
@@ -13,7 +13,7 @@ from tornado.testing import AsyncHTTPTestCase, gen_test, bind_unused_port, Expec
 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
index 0f21fe3c77d26eea6c623199ea7f0a370a2e0e45..4d0d656a3bc25c875993ef3d4244faa6d0d0bf96 100644 (file)
@@ -34,10 +34,10 @@ from typing import (
 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