File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ async def __start_session() -> None:
65
65
66
66
coro = __start_session ()
67
67
68
- asyncio .run_coroutine_threadsafe (coro , ToolboxSyncClient .__loop ).result ()
68
+ asyncio .run_coroutine_threadsafe (__start_session () , ToolboxSyncClient .__loop ).result ()
69
69
70
70
if not ToolboxSyncClient .__session :
71
71
raise ValueError ("Session cannot be None." )
@@ -114,6 +114,7 @@ def load_tool(
114
114
Returns:
115
115
ToolboxSyncTool: A synchronous callable object representing the loaded tool.
116
116
"""
117
+
117
118
async_tool = self .__run_as_sync (
118
119
self .__async_client .load_tool (tool_name , auth_token_getters , bound_params )
119
120
)
@@ -142,6 +143,7 @@ def load_toolset(
142
143
list[ToolboxSyncTool]: A list of synchronous callables, one for each
143
144
tool defined in the toolset.
144
145
"""
146
+
145
147
async_tools = self .__run_as_sync (
146
148
self .__async_client .load_toolset (
147
149
toolset_name , auth_token_getters , bound_params
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def __init__(
41
41
Args:
42
42
async_tool: An instance of the asynchronous ToolboxTool.
43
43
"""
44
+
44
45
if not isinstance (async_tool , ToolboxTool ):
45
46
raise TypeError ("async_tool must be an instance of ToolboxTool" )
46
47
@@ -109,6 +110,7 @@ def add_auth_token_getters(
109
110
Returns:
110
111
A new SyncToolboxTool instance wrapping the updated async tool.
111
112
"""
113
+
112
114
new_async_tool = self .__async_tool .add_auth_token_getters (auth_token_getters )
113
115
return ToolboxSyncTool (new_async_tool , self .__loop , self .__thread )
114
116
@@ -125,5 +127,6 @@ def bind_parameters(
125
127
Returns:
126
128
A new SyncToolboxTool instance wrapping the updated async tool.
127
129
"""
130
+
128
131
new_async_tool = self .__async_tool .bind_parameters (bound_params )
129
132
return ToolboxSyncTool (new_async_tool , self .__loop , self .__thread )
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
+
14
15
import pytest
15
16
16
17
from toolbox_core .sync_client import ToolboxSyncClient
You can’t perform that action at this time.
0 commit comments