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

Fix return type from intercept_service #43

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

mahlberg
Copy link
Contributor

@mahlberg mahlberg commented May 25, 2023

Description of change

Updating return type for ServerInterceptor.intercept_service, according to the gRPC documentation this can also return None. This is the documentation for the return type:

An RpcMethodHandler with which the RPC may be serviced if the interceptor chooses to service this RPC, or None otherwise.

Minimum Reproducible Example

This is a one-line change and I believe the provided typing test is sufficient.

Checklist:

  • I have verified my MRE is sufficient to demonstrate the issue and solution by attempting to execute it myself
    • OR I believe my contribution is minor enough that a typing test is sufficient.
  • I have added tests to typesafety/test_grpc.yml for all APIs added or changed by this PR
  • I have removed any code generation notices from anything seeded using mypy-protobuf.

ServerInterceptor.intercept_service returns an RpcMethodHandler instance
if the RPC is considered serviced, or None otherwise.
@shabbyrobe shabbyrobe merged commit 41edee8 into shabbyrobe:master Sep 29, 2023
@shabbyrobe
Copy link
Owner

Thank you!

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.

2 participants