Skip to content

Commit 05888dd

Browse files
modify the code format
1 parent 3e29365 commit 05888dd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tornado/platform/asyncio.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ async def thread_manager_anext() -> None:
495495
# starting.
496496
self._real_loop.call_soon(
497497
lambda: self._real_loop.create_task(thread_manager_anext()),
498-
context=self._main_thread_ctx
498+
context=self._main_thread_ctx,
499499
)
500500

501501
self._readers: Dict[_FileDescriptorLike, Callable] = {}
@@ -623,8 +623,7 @@ def _run_select(self) -> None:
623623

624624
try:
625625
self._real_loop.call_soon_threadsafe(
626-
self._handle_select, rs, ws,
627-
context=self._main_thread_ctx
626+
self._handle_select, rs, ws, context=self._main_thread_ctx
628627
)
629628
except RuntimeError:
630629
# "Event loop is closed". Swallow the exception for

tornado/test/asyncio_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ def test_tornado_accessor(self):
271271

272272

273273
class SelectorThreadContextvarsTest(AsyncHTTPTestCase):
274-
ctx_value = 'foo'
275-
test_endpoint = '/'
276-
tornado_test_ctx = contextvars.ContextVar('tornado_test_ctx', default='default')
274+
ctx_value = "foo"
275+
test_endpoint = "/"
276+
tornado_test_ctx = contextvars.ContextVar("tornado_test_ctx", default="default")
277277
tornado_test_ctx.set(ctx_value)
278278

279279
def get_app(self) -> Application:

0 commit comments

Comments
 (0)