vmagamedov/grpclib

Type hints for grpc.health.v1.health_pb2

icgood opened this issue · 4 comments

The mypy-protobuf plugin should generate a health_pb2.pyi file that would more accurately type hint the HealthCheckRequest and HealthCheckResponse messages. Without it, mypy does not consider them to be valid classes at all:

error: Variable "grpclib.health.v1.health_pb2.HealthCheckRequest" is not valid as a type

It looks like you already use the mypy-protobuf plugin, but maybe you decided not to commit the health_pb2.pyi file?

Yes, .pyi files are generated during release process, they're not committed on purpose. Is there something wrong with them? Or you don't use grpclib from PyPI?

Just checked and yes, there are no .pyi files. Unfortunately build logs are expired and deleted. Will try to fix this.

Released 0.4.3rc1 version with .pyi files included. Please try it and then I will make a proper release.

Fixed in 0.4.3rc1, thanks!