@@ -54,7 +54,9 @@ def f(record):
54
54
record .append (("f" , threading .current_thread ()))
55
55
raise ValueError
56
56
57
- await check_case (from_thread_run_sync , f , ("error" , ValueError ), trio_token = token )
57
+ await check_case (
58
+ from_thread_run_sync , f , ("error" , ValueError ), trio_token = token
59
+ )
58
60
59
61
async def f (record ):
60
62
assert not _core .currently_ki_protected ()
@@ -503,7 +505,9 @@ async def test_trio_from_thread_token_kwarg():
503
505
# Test that to_thread_run_sync and spawned trio.from_thread.run_sync() can
504
506
# use an explicitly defined token
505
507
def thread_fn (token ):
506
- callee_token = from_thread_run_sync (_core .current_trio_token , trio_token = token )
508
+ callee_token = from_thread_run_sync (
509
+ _core .current_trio_token , trio_token = token
510
+ )
507
511
return callee_token
508
512
509
513
caller_token = _core .current_trio_token ()
@@ -521,7 +525,9 @@ async def test_from_thread_no_token():
521
525
522
526
def test_run_fn_as_system_task_catched_badly_typed_token ():
523
527
with pytest .raises (RuntimeError ):
524
- from_thread_run_sync (_core .current_time , trio_token = "Not TrioTokentype" )
528
+ from_thread_run_sync (
529
+ _core .current_time , trio_token = "Not TrioTokentype"
530
+ )
525
531
526
532
527
533
async def test_do_in_trio_thread_from_trio_thread_legacy ():
0 commit comments