Skip to content

Commit d0b5020

Browse files
authored
fix: Ensure __parse_tool returns correct used_auth_keys (#204)
* 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. * fix: Reverse the error conditions to avoid masking of the second error. * fix: Fix the identification of used auth services while tool parsing.
1 parent 527369c commit d0b5020

File tree

1 file changed

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

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __parse_tool(
7979
else: # regular parameter
8080
params.append(p)
8181

82-
authn_params, _ = identify_required_authn_params(
82+
authn_params, used_auth_keys = identify_required_authn_params(
8383
authn_params, auth_token_getters.keys()
8484
)
8585

@@ -97,9 +97,6 @@ def __parse_tool(
9797
)
9898

9999
used_bound_keys = set(bound_params.keys())
100-
used_auth_keys: set[str] = set()
101-
for required_sources in authn_params.values():
102-
used_auth_keys.update(required_sources)
103100

104101
return tool, used_auth_keys, used_bound_keys
105102

0 commit comments

Comments
 (0)