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 @@ -64,7 +64,7 @@ async def __start_session() -> None:
64
64
65
65
coro = __start_session ()
66
66
67
- asyncio .run_coroutine_threadsafe (coro , ToolboxSyncClient .__loop ).result ()
67
+ asyncio .run_coroutine_threadsafe (__start_session () , ToolboxSyncClient .__loop ).result ()
68
68
69
69
if not ToolboxSyncClient .__session :
70
70
raise ValueError ("Session cannot be None." )
@@ -127,6 +127,7 @@ def load_tool(
127
127
for execution. The specific arguments and behavior of the callable
128
128
depend on the tool itself.
129
129
"""
130
+
130
131
async_tool = self .__run_as_sync (
131
132
self .__async_client .load_tool (name , auth_token_getters , bound_params )
132
133
)
@@ -155,6 +156,7 @@ def load_toolset(
155
156
list[ToolboxSyncTool]: A list of callables, one for each tool defined
156
157
in the toolset.
157
158
"""
159
+
158
160
async_tools = self .__run_as_sync (
159
161
self .__async_client .load_toolset (
160
162
name , auth_token_getters , bound_params
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ def __init__(
47
47
loop: The event loop used to run asynchronous tasks.
48
48
thread: The thread to run blocking operations in.
49
49
"""
50
+
50
51
if not isinstance (async_tool , ToolboxTool ):
51
52
raise TypeError ("async_tool must be an instance of ToolboxTool" )
52
53
@@ -113,6 +114,7 @@ def add_auth_token_getters(
113
114
A new ToolboxSyncTool instance with the specified authentication token
114
115
getters registered.
115
116
"""
117
+
116
118
new_async_tool = self .__async_tool .add_auth_token_getters (auth_token_getters )
117
119
return ToolboxSyncTool (new_async_tool , self .__loop , self .__thread )
118
120
@@ -129,5 +131,6 @@ def bind_parameters(
129
131
Returns:
130
132
A new ToolboxSyncTool instance with the specified parameters bound.
131
133
"""
134
+
132
135
new_async_tool = self .__async_tool .bind_parameters (bound_params )
133
136
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