Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing grpc.health.v1 stubs #29

Merged

Conversation

LiamAttClarke
Copy link
Contributor

@LiamAttClarke LiamAttClarke commented Mar 25, 2022

Was having issues importing grpc_health stubs.

Example:

from grpc_health.v1.health_pb2 import HealthCheckRequest
from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server

All files are generated using mypy-protobuf.

@shabbyrobe
Copy link
Owner

Thanks for reporting. Can you please provide more info about the issues? Is the snippet you provided a complete reproducer?

@LiamAttClarke
Copy link
Contributor Author

LiamAttClarke commented Mar 28, 2022

@shabbyrobe The snippet provided is all that is needed to reproduce.

The files I added provide type definitions for the corresponding files (health_pb2_grpc.py and health_pb2.py) in the grpc-health package.

Without those stubs, the Pylance extension in VSCode produces the following errors:

Import "grpc_health.v1.health_pb2" could not be resolved
Import "grpc_health.v1.health_pb2_grpc" could not be resolved

@shabbyrobe shabbyrobe merged commit a4dabe5 into shabbyrobe:master Mar 28, 2022
@shabbyrobe
Copy link
Owner

Thanks for the additional context and clarifications. LGTM.

shabbyrobe added a commit that referenced this pull request Apr 16, 2022
This reverts commit 9e7c887.

Fixes #30, but unfixes #29.
@shabbyrobe
Copy link
Owner

Just a heads-up, I've reverted this due to bug reports. I attempted to fix rather than revert but unfortunately ran out of time.

Feel free to resubmit another version in future, but please note that the acceptance threshold for PRs has been raised (as described in the project README).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants