Skip to content

Commit 8c65967

Browse files
seanzhougooglecopybara-github
authored andcommitted
fix: Make all subclass of BaseToolset to call parent constructor
So that all member field are created / initialized in the base toolset. PiperOrigin-RevId: 794388671
1 parent ebd726f commit 8c65967

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

src/google/adk/tools/application_integration_tool/application_integration_toolset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ def __init__(
134134
self._connection = connection
135135
self._entity_operations = entity_operations
136136
self._actions = actions
137-
self._tool_name_prefix = tool_name_prefix
138137
self._tool_instructions = tool_instructions
139138
self._service_account_json = service_account_json
140139
self._auth_scheme = auth_scheme

src/google/adk/tools/bigquery/bigquery_toolset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(
4343
credentials_config: Optional[BigQueryCredentialsConfig] = None,
4444
bigquery_tool_config: Optional[BigQueryToolConfig] = None,
4545
):
46-
self.tool_filter = tool_filter
46+
super().__init__(tool_filter=tool_filter)
4747
self._credentials_config = credentials_config
4848
self._tool_settings = (
4949
bigquery_tool_config if bigquery_tool_config else BigQueryToolConfig()

src/google/adk/tools/google_api_tool/google_api_toolset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ def __init__(
4747
tool_filter: Optional[Union[ToolPredicate, List[str]]] = None,
4848
service_account: Optional[ServiceAccount] = None,
4949
):
50+
super().__init__(tool_filter=tool_filter)
5051
self.api_name = api_name
5152
self.api_version = api_version
5253
self._client_id = client_id
5354
self._client_secret = client_secret
5455
self._service_account = service_account
5556
self._openapi_toolset = self._load_toolset_with_oidc_auth()
56-
self.tool_filter = tool_filter
5757

5858
@override
5959
async def get_tools(

src/google/adk/tools/spanner/spanner_toolset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
credentials_config: Optional[SpannerCredentialsConfig] = None,
4545
spanner_tool_settings: Optional[SpannerToolSettings] = None,
4646
):
47-
self.tool_filter = tool_filter
47+
super().__init__(tool_filter=tool_filter)
4848
self._credentials_config = credentials_config
4949
self._tool_settings = (
5050
spanner_tool_settings

0 commit comments

Comments
 (0)