Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,093 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
grpc, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
754
Forks
550
Merge medio
27 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de googleads/google-ads-python

Todos los issues de googleads/google-ads-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.