Skip to content

Commit 8138371

Browse files
committed
fix: Add the no parameter check back again.
We will remove this once we actually implement the `strict` flag and centralize this functionality by moving this check to the tool's constructor in a future PR.
1 parent 527369c commit 8138371

File tree

1 file changed

+2
-0
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ def bind_parameters(
316316
"""
317317
param_names = set(p.name for p in self.__params)
318318
for name in bound_params.keys():
319+
if name not in param_names:
320+
raise Exception(f"unable to bind parameters: no parameter named {name}")
319321
if name in self.__bound_parameters:
320322
raise ValueError(
321323
f"cannot re-bind parameter: parameter '{name}' is already bound"

0 commit comments

Comments
 (0)