Skip to content

Commit 211f40b

Browse files
authored
docs: Update docstring to be more accurate
1 parent edd1f3a commit 211f40b

File tree

1 file changed

+6
-1
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
description: The description of the remote tool.
6565
params: The args of the tool.
6666
required_authn_params: A dict of required authenticated parameters to a list
67-
of services that provide values for them.
67+
of alternative services that can provide values for them.
6868
auth_service_token_getters: A dict of authService -> token (or callables that
6969
produce a token)
7070
bound_params: A mapping of parameter names to bind to specific values or
@@ -288,6 +288,11 @@ def bind_parameters(
288288
"""
289289
param_names = set(p.name for p in self.__params)
290290
for name in bound_params.keys():
291+
if name in self.__bound_parameters:
292+
raise ValueError(
293+
f"cannot re-bind parameter: parameter '{name}' is already bound"
294+
)
295+
291296
if name not in param_names:
292297
raise Exception(f"unable to bind parameters: no parameter named {name}")
293298

0 commit comments

Comments
 (0)