Bare list/dict annotations leave GoogleAdsClient.get_service and generated request params partially unknown
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
- Área
- developer-experience, tooling
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, ...)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.
- Lenguaje dominante
- Python
- Estrellas
- 754
- Forks
- 550
- Merge medio
- 27 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de googleads/google-ads-python
-
Package license info is non-conformant with modern standardsPosiblemente ocupada @BenRKarl la tomó hace 95 días. Abiertobug triage
googleads/google-ads-python#1081 · 5 comentarios · 1 asignado ·
Todos los issues de googleads/google-ads-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
KalicoCrew/kalico#1012 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
esphome/esphome.io#7657 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
VNG-Realisatie/gemma-zaken#2658 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
comp/gateway comp/plugins duplicate P3 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NousResearch/hermes-agent#137019 ·
Los mantenedores suelen responder en 1 día