@@ -235,7 +235,7 @@ def remove_restart_callback(self, callback: t.Callable, event: str = "restart")
235235 # create a Client connected to our Kernel
236236 # --------------------------------------------------------------------------
237237
238- def client (self , ** kwargs : Any ) -> KernelClient :
238+ def client (self , ** kwargs : t . Any ) -> KernelClient :
239239 """Create a client configured to connect to our kernel"""
240240 kw = {}
241241 kw .update (self .get_connection_info (session = True ))
@@ -296,7 +296,7 @@ def from_ns(match):
296296
297297 return [pat .sub (from_ns , arg ) for arg in cmd ]
298298
299- async def _async_launch_kernel (self , kernel_cmd : t .List [str ], ** kw : Any ) -> None :
299+ async def _async_launch_kernel (self , kernel_cmd : t .List [str ], ** kw : t . Any ) -> None :
300300 """actually launch the kernel
301301
302302 override in a subclass to launch kernel subprocesses differently
@@ -324,7 +324,7 @@ def _close_control_socket(self) -> None:
324324 self ._control_socket .close ()
325325 self ._control_socket = None
326326
327- async def _async_pre_start_kernel (self , ** kw : Any ) -> t .Tuple [t .List [str ], t .Dict [str , t .Any ]]:
327+ async def _async_pre_start_kernel (self , ** kw : t . Any ) -> t .Tuple [t .List [str ], t .Dict [str , t .Any ]]:
328328 """Prepares a kernel for startup in a separate process.
329329
330330 If random ports (port=0) are being used, this method must be called
@@ -352,7 +352,7 @@ async def _async_pre_start_kernel(self, **kw: Any) -> t.Tuple[t.List[str], t.Dic
352352
353353 pre_start_kernel = run_sync (_async_pre_start_kernel )
354354
355- async def _async_post_start_kernel (self , ** kw : Any ) -> None :
355+ async def _async_post_start_kernel (self , ** kw : t . Any ) -> None :
356356 """Performs any post startup tasks relative to the kernel.
357357
358358 Parameters
@@ -368,7 +368,7 @@ async def _async_post_start_kernel(self, **kw: Any) -> None:
368368 post_start_kernel = run_sync (_async_post_start_kernel )
369369
370370 @in_pending_state
371- async def _async_start_kernel (self , ** kw : Any ) -> None :
371+ async def _async_start_kernel (self , ** kw : t . Any ) -> None :
372372 """Starts a kernel on this host in a separate process.
373373
374374 If random ports (port=0) are being used, this method must be called
@@ -500,7 +500,7 @@ async def _async_shutdown_kernel(self, now: bool = False, restart: bool = False)
500500 shutdown_kernel = run_sync (_async_shutdown_kernel )
501501
502502 async def _async_restart_kernel (
503- self , now : bool = False , newports : bool = False , ** kw : Any
503+ self , now : bool = False , newports : bool = False , ** kw : t . Any
504504 ) -> None :
505505 """Restarts a kernel with the arguments that were used to launch it.
506506
@@ -661,7 +661,7 @@ class AsyncKernelManager(KernelManager):
661661
662662
663663def start_new_kernel (
664- startup_timeout : float = 60 , kernel_name : str = "python" , ** kwargs : Any
664+ startup_timeout : float = 60 , kernel_name : str = "python" , ** kwargs : t . Any
665665) -> t .Tuple [KernelManager , KernelClient ]:
666666 """Start a new kernel, and return its Manager and Client"""
667667 km = KernelManager (kernel_name = kernel_name )
@@ -679,7 +679,7 @@ def start_new_kernel(
679679
680680
681681async def start_new_async_kernel (
682- startup_timeout : float = 60 , kernel_name : str = "python" , ** kwargs : Any
682+ startup_timeout : float = 60 , kernel_name : str = "python" , ** kwargs : t . Any
683683) -> t .Tuple [AsyncKernelManager , KernelClient ]:
684684 """Start a new kernel, and return its Manager and Client"""
685685 km = AsyncKernelManager (kernel_name = kernel_name )
@@ -697,7 +697,7 @@ async def start_new_async_kernel(
697697
698698
699699@contextmanager
700- def run_kernel (** kwargs : Any ) -> t .Iterator [KernelClient ]:
700+ def run_kernel (** kwargs : t . Any ) -> t .Iterator [KernelClient ]:
701701 """Context manager to create a kernel in a subprocess.
702702
703703 The kernel is shut down when the context exits.
0 commit comments