Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bare list/dict annotations leave GoogleAdsClient.get_service and generated request params partially unknown

オープン
#1,093 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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, ...) in google/ads/googleads/client.py. list[grpc.UnaryUnaryClientInterceptor] or Sequence[...] would type it.
  • Every generated service method: request: Optional[Union[<Request>, dict]] = None, for example ConversionUploadServiceClient.upload_click_conversions. This comes from the ads generator template (packages/gapic-generator/gapic/ads-templates/.../client.py.j2 in 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleads/google-ads-python のほかの issue

googleads/google-ads-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。