Bare list/dict annotations leave GoogleAdsClient.get_service and generated request params partially unknown
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 74/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- grpc, python
- Domínio
- developer-experience, tooling
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 760
- Forks
- 547
- Merge médio
- 2h 16min
- PRs com merge (30d)
- 3
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de googleads/google-ads-python
-
Support Python 3.15Abertaenhancement triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
googleads/google-ads-python#1099 ·
Mantenedores costumam responder em até 1 dia
-
Package license info is non-conformant with modern standardsTalvez já em andamento @BenRKarl assumiu há 121 dias. Abertabug triage
googleads/google-ads-python#1081 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de googleads/google-ads-python
Issues semelhantes
-
[BUG]: Compliance rules never see Unity Catalog views as viewsTalvez já em andamento @wagnercsantos assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
databrickslabs/ontos#1348 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ibm-granite/granite.build#649 ·
Mantenedores costumam responder em até 1 dia
-
`forum_pr_poster` action will always return `none` when checking for pre-existing feedback threads, even if a feedback thread already exists.Talvez já em andamento @pgmzeta assumiu hoje. AbertaE-Verified P-Major
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
goonstation/goonstation#28259 ·
Mantenedores costumam responder em até 2 dias
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
woonstadrotterdam/monumenten#70 ·
Mantenedores costumam responder em até 15 dias
-
binding:python bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia