Skip to content

docs: Improve function docstrings and README #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/toolbox-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ specific tool instance.
toolbox = ToolboxClient("http://127.0.0.1:5000")
tool = await toolbox.load_tool("my-tool")

bound_tool = tool.bind_param("param", "value")

# OR

bound_tool = tool.bind_params({"param": "value"})
```

Expand Down
11 changes: 5 additions & 6 deletions packages/toolbox-core/src/toolbox_core/sync_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def add_auth_token_getters(

Raises:
ValueError: If an auth source has already been registered either to
the tool or to the corresponding client.
"""
the tool or to the corresponding client.

"""
new_async_tool = self.__async_tool.add_auth_token_getters(auth_token_getters)
return ToolboxSyncTool(new_async_tool, self.__loop, self.__thread)

Expand All @@ -175,7 +175,7 @@ def add_auth_token_getter(

Raises:
ValueError: If the auth source has already been registered either to
the tool or to the corresponding client.
the tool or to the corresponding client.

"""
return self.add_auth_token_getters({auth_source: get_id_token})
Expand All @@ -187,8 +187,8 @@ def bind_params(
Binds parameters to values or callables that produce values.

Args:
bound_params: A mapping of parameter names to values or callables that
produce values.
bound_params: A mapping of parameter names to values or callables
that produce values.

Returns:
A new ToolboxSyncTool instance with the specified parameters bound.
Expand All @@ -198,7 +198,6 @@ def bind_params(
tool's definition.

"""

new_async_tool = self.__async_tool.bind_params(bound_params)
return ToolboxSyncTool(new_async_tool, self.__loop, self.__thread)

Expand Down