Two docstrings in openapi_tool document parameters the signatures do not accept
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 88/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py:352 と src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py:69 のdocstringを、それぞれのメソッドシグネチャと照らし合わせて読む。1つ目を更新し、parsed_operation_str がJSON文字列であると説明し、2つ目から存在しない引数 auth_scheme を削除する。両方のArgsセクションがシグネチャと型に一致したら完了。
索引モデルが issue の本文から書いたものです。
説明
Two docstrings in google/adk document parameters that the signatures do not accept
Both are in the OpenAPI tooling under src/google/adk/tools/openapi_tool/. Neither affects behaviour; both mislead anyone reading the reference for the tool-building path.
1. RestApiTool.from_parsed_operation_str — wrong name and wrong type
src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py:352
@classmethod
def from_parsed_operation_str(
cls, parsed_operation_str: str
) -> "RestApiTool":
"""Initializes the RestApiTool from a dict.
Args:
parsed: A dict representation of a ParsedOperation object.
...
operation = ParsedOperation.model_validate_json(parsed_operation_str)
The parameter is parsed_operation_str, and it is a JSON string (model_validate_json), not a dict. Both halves of the sentence are stale: the name and the type.
2. OAuth2CredentialExchanger.generate_auth_token — documents a parameter that is not there
src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py:69
def generate_auth_token(
self,
auth_credential: Optional[AuthCredential] = None,
) -> AuthCredential:
"""Generates an auth token from the authorization response.
Args:
auth_scheme: The OpenID Connect or OAuth2 auth scheme.
auth_credential: The auth credential.
auth_scheme is not a parameter of this method (the scheme was consumed by AuthCredential earlier in the flow). auth_credential is.
Suggested diff
--- 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
@@
- """Initializes the RestApiTool from a dict.
+ """Initializes the RestApiTool from a serialized ParsedOperation.
Args:
- parsed: A dict representation of a ParsedOperation object.
+ parsed_operation_str: A JSON string representation of a ParsedOperation object.
--- 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
@@
Args:
- auth_scheme: The OpenID Connect or OAuth2 auth scheme.
auth_credential: The auth credential.
How this was found
A static check over Google-style Args: blocks that reports entries whose name is not an argument of the enclosing function; the two rows above were then read against the signatures by hand. A repo-wide run also flagged application_integration_toolset.py and the _execute_sql_* helpers in the BigQuery integration, but those are **kwargs forwarding and a nested-section parse, i.e. not defects, so they are excluded here.
Why an issue and not a PR
CONTRIBUTING.md requires a signed Google CLA before a PR, and the google-cla check fails for this account (confirmed on a separate Google repository — google/XNNPACK#11910 shows cla/google failing until the agreement is signed). If you would rather have the patch directly, I can open the PR as soon as the CLA is signed on my side; otherwise this report is everything needed for the two-line fix.
- 主要言語
- Python
- スター
- 22.3k
- フォーク
- 4.4k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/adk-python#8360 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
google/adk-python#8359 ·
メンテナーはふだん 3 日以内に返信
-
Can pin to litellm version be changed?対応中かも @llalitkumarrr が 10 日前に担当しました。 オープンmodels
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
google/adk-python#8129 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
OpenAPI tools ignore operation- and path-level server overrides対応中かも @sanketpatil06 が 14 日前に担当しました。 オープンtools
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#8064 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
`adk run` does not support arrow keys or input history対応中かも @llalitkumarrr が 17 日前に担当しました。 オープンcli
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
google/adk-python#8022 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
google/adk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vllm-project/vllm#70030 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TigreGotico/tugaphone#408 ·
メンテナーはふだん 1 日以内に返信
-
t: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Azure/azure-sdk-for-python#50155 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信