You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the work on this project. It really improves the development workflow to have the proto and grpc interfaces recognizable by the language server (vscode pyright in my case).
The confusion / bug
When inspecting the generated .pyi file, I notice that the method type referenced in the client stub: grpc.UnaryUnaryMultiCallable is hinted with two type parameters:
However, in the source implementation there are no generic typevars bound to the grpc.UnaryUnaryMultiCallable.
It looks like there are typevars bound to the async version of the async version of unary-unary RPC that can be found here.
Let me know if something might be misconfigured on my side -- elsewise, more than happy to open a PR that suggests adding in the RequestType and ResponseType generics to the synchronous unary-unary in the grpc repo!
It's a minor issue, but since the UnaryUnaryMultiCallable.__call__ doesn't have types, the return type of the generated RPC request method on the client will be unknown for type checkers.
Hi, thanks for the work on this project. It really improves the development workflow to have the proto and grpc interfaces recognizable by the language server (vscode pyright in my case).
The confusion / bug
When inspecting the generated .pyi file, I notice that the method type referenced in the client stub:
grpc.UnaryUnaryMultiCallable
is hinted with two type parameters:However, in the source implementation there are no generic typevars bound to the
grpc.UnaryUnaryMultiCallable
.It looks like there are typevars bound to the async version of the async version of unary-unary RPC that can be found here.
Let me know if something might be misconfigured on my side -- elsewise, more than happy to open a PR that suggests adding in the
RequestType
andResponseType
generics to the synchronous unary-unary in the grpc repo!Background / replication
Simplen sample client stub .proto file:
By running:
python -m grpc_tools.protoc \ -Iproto \ --python_out=client/generated \ --mypy_out=client/generated \ --grpc_python_out=client/generated \ --mypy_grpc_out=client/generated \ proto/*.proto
...It produces the following
pb2_grpc_.pyi
stub file:The text was updated successfully, but these errors were encountered: