Skip to content

docs(tools): correct three docstring argument blocks - #8092

Open
lxcxjxhx wants to merge 1 commit into
google:mainfrom
lxcxjxhx:docs/docstring-args
Open

lxcxjxhx wants to merge 1 commit into
google:mainfrom
lxcxjxhx:docs/docstring-args

Conversation

@lxcxjxhx

Copy link
Copy Markdown

Three docstrings in src/google/adk/tools/ do not match their functions:

Function Problem Fix
ApplicationIntegrationToolset.__init__ the docstring opens with """Args: and then repeats Args: on the next paragraph first one becomes a one-line summary, real block untouched
OAuth2CredentialExchanger.generate_auth_token documents auth_scheme the scheme is a constructor parameter; the argument is only auth_credential
RestApiTool.from_parsed_operation_str documents parsed: A dict representation of a ParsedOperation object the parameter is parsed_operation_str: str, and the body calls ParsedOperation.model_validate_json(...) on it

The third one is the one that would actually mislead: the type is wrong (dict vs str) as well as the name, so a reader passing a dict gets a validation error from model_validate_json.

Verification

  • AST comparison against the previous head with docstrings excluded: identical for all three files.
  • ruff check on the three files: All checks passed! before and after.
  • No test covers docstring text; the change is text only.

Note: this repo requires the Google CLA before merging.

- `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.
@google-cla

google-cla Bot commented Nov 11, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants