@@ -116,7 +116,7 @@ def list_subshell(self) -> list[str]:
116116 with self ._lock_cache :
117117 return list (self ._cache )
118118
119- async def listen_from_control (self , subshell_task ) -> None :
119+ async def listen_from_control (self , subshell_task : t . Callable ) -> None :
120120 """Listen for messages on the control inproc socket, handle those messages and
121121 return replies on the same socket. Runs in the shell channel thread.
122122 """
@@ -141,7 +141,7 @@ async def listen_from_subshells(self) -> None:
141141 async for subshell_id in self ._receive_stream :
142142 tg .start_soon (self ._listen_for_subshell_reply , subshell_id )
143143
144- def subshell_id_from_thread_id (self , thread_id ) -> str | None :
144+ def subshell_id_from_thread_id (self , thread_id : int ) -> str | None :
145145 """Return subshell_id of the specified thread_id.
146146
147147 Raises RuntimeError if thread_id is not the main shell or a subshell.
@@ -169,7 +169,7 @@ def _create_inproc_pair_socket(
169169 socket .connect (address )
170170 return socket
171171
172- async def _create_subshell (self , subshell_task ) -> str :
172+ async def _create_subshell (self , subshell_task : t . Callable ) -> str :
173173 """Create and start a new subshell thread."""
174174 assert current_thread ().name == SHELL_CHANNEL_THREAD_NAME
175175
@@ -241,7 +241,9 @@ async def _listen_for_subshell_reply(self, subshell_id: str | None) -> None:
241241 return
242242 raise
243243
244- async def _process_control_request (self , request , subshell_task ) -> dict [str , t .Any ]:
244+ async def _process_control_request (
245+ self , request : dict [str , t .Any ], subshell_task : t .Callable
246+ ) -> dict [str , t .Any ]:
245247 """Process a control request message received on the control inproc
246248 socket and return the reply. Runs in the shell channel thread.
247249 """
0 commit comments