From dfc032f0959813794cb7c956e7371ad8b5d7aebd Mon Sep 17 00:00:00 2001 From: lxcxjxhx Date: Wed, 11 Nov 2026 15:17:34 +0800 Subject: [PATCH] docs(tools): correct three docstring argument blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `ApplicationIntegrationToolset.__init__` opens its docstring with `Args:` and then repeats the heading on the next paragraph. The first one is replaced with a one-line summary; the real block is unchanged. - `OAuth2CredentialExchanger.generate_auth_token` documents an `auth_scheme` argument it does not take — the scheme is a constructor parameter of the exchanger. - `RestApiTool.from_parsed_operation_str` documents `parsed: A dict representation of a ParsedOperation object`, but the parameter is `parsed_operation_str: str` and the body calls `ParsedOperation.model_validate_json(...)` on it. Docstrings only: an AST comparison against the previous head is identical once docstrings are excluded, and `ruff check` on the three files passes before and after. --- .../application_integration_toolset.py | 2 +- .../openapi_tool/auth/credential_exchangers/oauth2_exchanger.py | 1 - .../adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/google/adk/tools/application_integration_tool/application_integration_toolset.py b/src/google/adk/tools/application_integration_tool/application_integration_toolset.py index e833b47934f..1bac5156f84 100644 --- a/src/google/adk/tools/application_integration_tool/application_integration_toolset.py +++ b/src/google/adk/tools/application_integration_tool/application_integration_toolset.py @@ -106,7 +106,7 @@ def __init__( *, allow_private_network_access: bool = False, ): - """Args: + """Initializes the toolset. Args: project: The GCP project ID. diff --git a/src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py b/src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py index 03783d774b2..01a1d8a9c7b 100644 --- a/src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py +++ b/src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py @@ -72,7 +72,6 @@ def generate_auth_token( """Generates an auth token from the authorization response. Args: - auth_scheme: The OpenID Connect or OAuth2 auth scheme. auth_credential: The auth credential. Returns: diff --git a/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py b/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py index 18dbb70b259..dca6309c6a6 100644 --- a/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py +++ b/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py @@ -355,7 +355,7 @@ def from_parsed_operation_str( """Initializes the RestApiTool from a dict. Args: - parsed: A dict representation of a ParsedOperation object. + parsed_operation_str: The JSON representation of a ParsedOperation object. Returns: A RestApiTool object.