0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix(client_utils): simplify RPC client instantiation in BECGuiClient

This commit is contained in:
2025-04-11 13:25:10 +02:00
parent 20a86ad325
commit 96b31a4509

View File

@ -291,13 +291,11 @@ class BECGuiClient(RPCBase):
self.start(wait=True) self.start(wait=True)
if wait: if wait:
with wait_for_server(self): with wait_for_server(self):
rpc_client = RPCBase(gui_id=f"{self._gui_id}:launcher", parent=self) widget = self.launcher._run_rpc(
widget = rpc_client._run_rpc(
"launch", "dock_area", name, geometry "launch", "dock_area", name, geometry
) # pylint: disable=protected-access ) # pylint: disable=protected-access
return widget return widget
rpc_client = RPCBase(gui_id=f"{self._gui_id}:launcher", parent=self) widget = self.launcher._run_rpc(
widget = rpc_client._run_rpc(
"new_dock_area", name, geometry "new_dock_area", name, geometry
) # pylint: disable=protected-access ) # pylint: disable=protected-access
return widget return widget