File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ async def serve(
1717 config : Config ,
1818 * ,
1919 shutdown_trigger : Callable [..., Awaitable [None ]] | None = None ,
20- task_status : trio .TaskStatus = trio .TASK_STATUS_IGNORED ,
20+ task_status : trio .TaskStatus [ list [ str ]] = trio .TASK_STATUS_IGNORED ,
2121 mode : Literal ["asgi" , "wsgi" ] | None = None ,
2222) -> None :
2323 """Serve an ASGI framework app given the config.
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ async def worker_serve(
3333 * ,
3434 sockets : Sockets | None = None ,
3535 shutdown_trigger : Callable [..., Awaitable [None ]] | None = None ,
36- task_status : trio .TaskStatus = trio .TASK_STATUS_IGNORED ,
36+ task_status : trio .TaskStatus [ list [ str ]] = trio .TASK_STATUS_IGNORED ,
3737) -> None :
3838 config .set_statsd_logger_class (StatsdLogger )
3939
@@ -86,7 +86,7 @@ async def worker_serve(
8686 bind = repr_socket_addr (sock .family , sock .getsockname ())
8787 await config .log .info (f"Running on https://{ bind } (QUIC) (CTRL + C to quit)" )
8888
89- task_status .started (binds ) # type: ignore[call-overload]
89+ task_status .started (binds )
9090 try :
9191 async with trio .open_nursery (strict_exception_groups = True ) as nursery :
9292 if shutdown_trigger is not None :
Original file line number Diff line number Diff line change 1111def _cancel_wrapper (func : Callable [[], Awaitable [None ]]) -> Callable [[], Awaitable [None ]]:
1212 @wraps (func )
1313 async def wrapper (
14- task_status : trio .TaskStatus = trio .TASK_STATUS_IGNORED ,
14+ task_status : trio .TaskStatus [ trio . CancelScope ] = trio .TASK_STATUS_IGNORED ,
1515 ) -> None :
1616 cancel_scope = trio .CancelScope ()
17- task_status .started (cancel_scope ) # type: ignore[call-overload]
17+ task_status .started (cancel_scope )
1818 with cancel_scope :
1919 await func ()
2020
You can’t perform that action at this time.
0 commit comments