Skip to content

generated client mypy issue #2087

@daniel-sanche

Description

@daniel-sanche

I'm seeing some mypy errors in #2085 that seem unrelated to the changes:

google/showcase_v1beta1/services/messaging/async_client.py:179: error: Argument 1 to "get_transport_class" of "MessagingClientMeta" has incompatible type "type[type[MessagingClient]]"; expected "MessagingClientMeta"  [arg-type]
google/showcase_v1beta1/services/identity/async_client.py:169: error: Argument 1 to "get_transport_class" of "IdentityClientMeta" has incompatible type "type[type[IdentityClient]]"; expected "IdentityClientMeta"  [arg-type]
google/showcase_v1beta1/services/echo/async_client.py:182: error: Argument 1 to "get_transport_class" of "EchoClientMeta" has incompatible type "type[type[EchoClient]]"; expected "EchoClientMeta"  [arg-type]
Found 3 errors in 3 files (checked 37 source files)

Separately, we noticed the same error message in python-datastore's gapic outputs, and resolved it by only type-checking veneer code

It seems related to this line in the gapic generator, which compiles to look like this. Maybe it should use {{ service.client_name }}Meta instead of type(self)?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions