Skip to content

Commit cacec35

Browse files
committed
lint
1 parent 033c85d commit cacec35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/toolbox-core/src/toolbox_core/sync_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def load_tool(
108108
depend on the tool itself.
109109
"""
110110
coro = self.__async_client.load_tool(name, auth_token_getters, bound_params)
111-
async_tool = asyncio.run_coroutine_threadsafe(coro, self.__loop).result()
111+
112+
# We have already created a new loop in the init method in case it does not already exist
113+
async_tool = asyncio.run_coroutine_threadsafe(coro, self.__loop).result() # type: ignore
112114

113115
if not self.__loop or not self.__thread:
114116
raise ValueError("Background loop or thread cannot be None.")
@@ -135,7 +137,9 @@ def load_toolset(
135137
in the toolset.
136138
"""
137139
coro = self.__async_client.load_toolset(name, auth_token_getters, bound_params)
138-
async_tools = asyncio.run_coroutine_threadsafe(coro, self.__loop).result()
140+
141+
# We have already created a new loop in the init method in case it does not already exist
142+
async_tools = asyncio.run_coroutine_threadsafe(coro, self.__loop).result() # type: ignore
139143

140144
if not self.__loop or not self.__thread:
141145
raise ValueError("Background loop or thread cannot be None.")

0 commit comments

Comments
 (0)