From: Thomas Kluyver Date: Fri, 10 Feb 2023 17:11:54 +0000 (+0000) Subject: Linter fixes X-Git-Tag: v6.3.0b1~8^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4559b3024309135895721d98170ffdeb15d33e4;p=thirdparty%2Ftornado.git Linter fixes --- diff --git a/tornado/test/asyncio_test.py b/tornado/test/asyncio_test.py index 3d6bb39cc..3a08ea494 100644 --- a/tornado/test/asyncio_test.py +++ b/tornado/test/asyncio_test.py @@ -32,7 +32,7 @@ class AsyncIOLoopTest(AsyncTestCase): @property def asyncio_loop(self): - return self.io_loop.asyncio_loop + return self.io_loop.asyncio_loop # type: ignore def test_asyncio_callback(self): # Basic test that the asyncio loop is set up correctly. @@ -191,7 +191,8 @@ class AnyThreadEventLoopPolicyTest(unittest.TestCase): # Set the policy and we can get a loop. asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) self.assertIsInstance( - self.executor.submit(asyncio.get_event_loop).result(), asyncio.AbstractEventLoop + self.executor.submit(asyncio.get_event_loop).result(), + asyncio.AbstractEventLoop, ) # Clean up to silence leak warnings. Always use asyncio since # IOLoop doesn't (currently) close the underlying loop. @@ -202,15 +203,11 @@ class AnyThreadEventLoopPolicyTest(unittest.TestCase): # regardless of this event loop policy. with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) - self.assertIsInstance( - self.executor.submit(IOLoop.current).result(), IOLoop - ) + self.assertIsInstance(self.executor.submit(IOLoop.current).result(), IOLoop) # Clean up to silence leak warnings. Always use asyncio since # IOLoop doesn't (currently) close the underlying loop. self.executor.submit(lambda: asyncio.get_event_loop().close()).result() # type: ignore asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) - self.assertIsInstance( - self.executor.submit(IOLoop.current).result(), IOLoop - ) + self.assertIsInstance(self.executor.submit(IOLoop.current).result(), IOLoop) self.executor.submit(lambda: asyncio.get_event_loop().close()).result() # type: ignore