-
Notifications
You must be signed in to change notification settings - Fork 23
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
Improve interceptor typing #47
Comments
I don't currently have time to do this myself, but would be open to PRs. I only have a few conditions for this kind of thing:
The tests currently run on both the minimum and current versions of dependencies, as a "good enough" way to test that the package works for the entire range of supported dependency versions. With stricter typing I might want to extend that to run If you want to take a stab at this it would be much appreciated! Thanks! |
@dan-hipschman that all makes sense, and I agree with keeping deps at a necessary minimum. With that in mind, the above change would add a dependency on the google package to import the Let me know what you prefer, or feel free to close this issue. I won’t feel personally offended or rejected 🤓 |
It looks like the |
Alright… in that case I’m happy to provide a PR for discussion, if you’d like? |
Sure! I'm definitely pro better typing. My only concern is breaking existing users' CI checks, or missing types so valid use cases can't be type checked. The former isn't a major concern, because ideally their CI checks would only break if they had a potential bug. But it's important that the types are accurate so all valid use cases can pass type checking. Here are a few other thoughts:
That's all I can think of right now. If you still want to take this up, then that's much appreciated! :) |
I’ve been using this package for a while and it works great, thank you @d5h!
And because all of our code is typed I was wondering if you’d agree to tightening the type hints in this package a little bit. For example, I think
grpc-interceptor/src/grpc_interceptor/server.py
Line 21 in af11a9b
could really be
(assuming the gRPC implementation shuffles protobuf messages around); and for example
grpc-interceptor/src/grpc_interceptor/server.py
Line 20 in af11a9b
could also be
Not pretty, I admit, but for the sake of discussion here.
The text was updated successfully, but these errors were encountered: