Skip to content

Commit 6b89ceb

Browse files
Jacksunweicopybara-github
authored andcommitted
fix: mutable object cannot be default value in parameter.
PiperOrigin-RevId: 763479612
1 parent 694eca0 commit 6b89ceb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/google/adk/tools/toolbox_toolset.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ def __init__(
4444
server_url: str,
4545
toolset_name: Optional[str] = None,
4646
tool_names: Optional[List[str]] = None,
47-
auth_token_getters: dict[str, Callable[[], str]] = {},
48-
bound_params: Mapping[str, Union[Callable[[], Any], Any]] = {},
47+
auth_token_getters: Optional[dict[str, Callable[[], str]]] = None,
48+
bound_params: Optional[
49+
Mapping[str, Union[Callable[[], Any], Any]]
50+
] = None,
4951
):
5052
"""Args:
5153
@@ -70,8 +72,8 @@ def __init__(
7072
self._toolbox_client = toolbox.ToolboxClient(server_url)
7173
self._toolset_name = toolset_name
7274
self._tool_names = tool_names
73-
self._auth_token_getters = auth_token_getters
74-
self._bound_params = bound_params
75+
self._auth_token_getters = auth_token_getters or {}
76+
self._bound_params = bound_params or {}
7577

7678
@override
7779
async def get_tools(

0 commit comments

Comments
 (0)