@@ -62,7 +62,7 @@ def __init__(
62
62
bound_params: A mapping of parameter names to their bound
63
63
values.
64
64
strict: If True, raises a ValueError if any of the given bound
65
- parameters are missing from the schema or require
65
+ parameters is missing from the schema or requires
66
66
authentication. If False, only issues a warning.
67
67
"""
68
68
@@ -260,7 +260,7 @@ def __create_copy(
260
260
bound values or functions to retrieve the values. These params
261
261
will be merged with the existing bound params.
262
262
strict: If True, raises a ValueError if any of the given bound
263
- parameters are missing from the schema or require
263
+ parameters is missing from the schema or requires
264
264
authentication. If False, only issues a warning.
265
265
266
266
Returns:
@@ -297,16 +297,18 @@ def add_auth_tokens(
297
297
auth_tokens: A dictionary of authentication source names to the
298
298
functions that return corresponding ID token.
299
299
strict: If True, a ValueError is raised if any of the provided auth
300
- tokens are already bound. If False, only a warning is issued.
300
+ parameters is already bound. If False, only a warning is issued.
301
301
302
302
Returns:
303
303
A new AsyncToolboxTool instance that is a deep copy of the current
304
304
instance, with added auth tokens.
305
305
306
306
Raises:
307
- ValueError: If the provided auth tokens are already registered.
308
- ValueError: If the provided auth tokens are already bound and strict
309
- is True.
307
+ ValueError: If any of the provided auth parameters is already
308
+ registered.
309
+ ValueError: If any of the provided auth parameters is already bound
310
+ and strict is True.
311
+
310
312
"""
311
313
312
314
# Check if the authentication source is already registered.
@@ -332,17 +334,17 @@ def add_auth_token(
332
334
Args:
333
335
auth_source: The name of the authentication source.
334
336
get_id_token: A function that returns the ID token.
335
- strict: If True, a ValueError is raised if any of the provided auth
336
- token is already bound. If False, only a warning is issued.
337
+ strict: If True, a ValueError is raised if the provided auth
338
+ parameter is already bound. If False, only a warning is issued.
337
339
338
340
Returns:
339
341
A new ToolboxTool instance that is a deep copy of the current
340
342
instance, with added auth token.
341
343
342
344
Raises:
343
- ValueError: If the provided auth token is already registered.
344
- ValueError: If the provided auth token is already bound and strict
345
- is True.
345
+ ValueError: If the provided auth parameter is already registered.
346
+ ValueError: If the provided auth parameter is already bound and
347
+ strict is True.
346
348
"""
347
349
return self .add_auth_tokens ({auth_source : get_id_token }, strict = strict )
348
350
@@ -359,17 +361,18 @@ def bind_params(
359
361
bound_params: A dictionary of the bound parameter name to the
360
362
value or function of the bound value.
361
363
strict: If True, a ValueError is raised if any of the provided bound
362
- params are not defined in the tool's schema, or require
364
+ params is not defined in the tool's schema, or requires
363
365
authentication. If False, only a warning is issued.
364
366
365
367
Returns:
366
368
A new AsyncToolboxTool instance that is a deep copy of the current
367
369
instance, with added bound params.
368
370
369
371
Raises:
370
- ValueError: If the provided bound params are already bound.
371
- ValueError: if the provided bound params are not defined in the tool's schema, or require
372
- authentication, and strict is True.
372
+ ValueError: If any of the provided bound params is already bound.
373
+ ValueError: if any of the provided bound params is not defined in
374
+ the tool's schema, or requires authentication, and strict is
375
+ True.
373
376
"""
374
377
375
378
# Check if the parameter is already bound.
@@ -399,9 +402,9 @@ def bind_param(
399
402
param_name: The name of the bound parameter.
400
403
param_value: The value of the bound parameter, or a callable that
401
404
returns the value.
402
- strict: If True, a ValueError is raised if any of the provided bound
403
- params is not defined in the tool's schema, or requires
404
- authentication. If False, only a warning is issued.
405
+ strict: If True, a ValueError is raised if the provided bound param
406
+ is not defined in the tool's schema, or requires authentication.
407
+ If False, only a warning is issued.
405
408
406
409
Returns:
407
410
A new ToolboxTool instance that is a deep copy of the current
0 commit comments