Bare list/dict annotations leave GoogleAdsClient.get_service and generated request params partially unknown
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- grpc, python
調査の方向性
Start with google/ads/googleads/client.py and the ads generator client.py.j2 template named in the issue, then reproduce the strict pyright diagnostics with the provided example. Update the annotations at both locations and verify that get_service and generated request parameters no longer produce partially unknown types; the issue describes these as annotation-only changes with no runtime effect.
索引モデルが issue の本文から書いたものです。
説明
With google-ads 31.0.0 under pyright strict, two annotations without type arguments make every call site report reportUnknownMemberType:
GoogleAdsClient.get_service(..., interceptors: Union[list, None] = None, ...)ingoogle/ads/googleads/client.py.list[grpc.UnaryUnaryClientInterceptor]orSequence[...]would type it.- Every generated service method:
request: Optional[Union[<Request>, dict]] = None, for exampleConversionUploadServiceClient.upload_click_conversions. This comes from the ads generator template (packages/gapic-generator/gapic/ads-templates/.../client.py.j2in googleapis/google-cloud-python).Dict[str, Any]would type it.
Repro:
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.v24.services.services.conversion_upload_service import ConversionUploadServiceClient
def f(c: GoogleAdsClient, s: ConversionUploadServiceClient) -> None:
c.get_service("ConversionUploadService") # Type of "get_service" is partially unknown
s.upload_click_conversions(request=None) # Type of "upload_click_conversions" is partially unknown
These are annotation-only changes with no runtime effect. Callers currently work around them with local Protocols.
- 主要言語
- Python
- スター
- 754
- フォーク
- 550
- 平均マージ
- 27分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleads/google-ads-python のほかの issue
-
Package license info is non-conformant with modern standards対応中かも @BenRKarl が 97 日前に担当しました。 オープンbug triage
googleads/google-ads-python#1081 · コメント 5 件 · 担当者 1 名 ·
googleads/google-ads-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
uniswap-python/uniswap-python#487 ·
-
[Bug]: agent_final_response still returns the abandoned branch's answer after navigate moves HEAD back対応中かも @enyst が今日担当しました。 オープンbug priority:low ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenHands/software-agent-sdk#5822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
area: server enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
scs0209/laya-guard#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信