@@ -102,9 +102,7 @@ def get_comm_manager():
102102 self .iopub_channel = connect_channel ("iopub" , self .connection_cfg )
103103 self .control_channel = connect_channel ("control" , self .connection_cfg )
104104 self .stdin_channel = connect_channel ("stdin" , self .connection_cfg )
105- msg = self .create_message (
106- "status" , content = {"execution_state" : self .execution_state }
107- )
105+ msg = self .create_message ("status" , content = {"execution_state" : self .execution_state })
108106 send_message (msg , self .iopub_channel , self .key )
109107 self .execution_state = "idle"
110108 self .stop = asyncio .Event ()
@@ -166,8 +164,7 @@ def init_kernel(self, namespace):
166164 self .locals [namespace ] = {}
167165 if self .react_kernel :
168166 code = (
169- "import ipyx, ipywidgets;"
170- "globals().update({'ipyx': ipyx, 'ipywidgets': ipywidgets})"
167+ "import ipyx, ipywidgets;globals().update({'ipyx': ipyx, 'ipywidgets': ipywidgets})"
171168 )
172169 exec (code , self .globals [namespace ], self .locals [namespace ])
173170
@@ -314,10 +311,7 @@ async def listen_shell(self) -> None:
314311 parent_header = parent_header ,
315312 content = {
316313 "status" : "ok" ,
317- "comms" : {
318- comm_id : {"target_name" : target_name }
319- for comm_id in comms
320- },
314+ "comms" : {comm_id : {"target_name" : target_name } for comm_id in comms },
321315 },
322316 )
323317 send_message (msg2 , self .shell_channel , self .key , idents [0 ])
@@ -329,7 +323,7 @@ async def listen_shell(self) -> None:
329323 )
330324 send_message (msg2 , self .iopub_channel , self .key )
331325 elif msg_type == "comm_msg" :
332- self .comm_manager .comm_msg (None , None , msg )
326+ self .comm_manager .comm_msg (None , None , msg ) # type: ignore[arg-type]
333327
334328 async def listen_control (self ) -> None :
335329 while True :
0 commit comments