-
Notifications
You must be signed in to change notification settings - Fork 36
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
Proper type hints for @metric_scope decorator to work nicely with mypy #70
base: master
Are you sure you want to change the base?
Proper type hints for @metric_scope decorator to work nicely with mypy #70
Conversation
Hello @jaredcnance, By chance, could anyone review it? (It is a very small change) Thanks for your work Regards |
Hello @jaredcnance, @02strich, @ridha ? The PR is quite simple, anyone for a review? Kind Regards |
Ping @jaredcnance |
When using @metric_scope on a typed function, mypy produces this kind of error: error: Untyped decorator makes function "handler" untyped This fix avoid this error and will let people using typehint now having those kind of error messages. See https://mypy.readthedocs.io/en/stable/generics.html#declaring-decorators
48e0477
to
d147a36
Compare
@jaredcnance Do you think you might have a look? |
Merging this would be useful for me. |
@jaredcnance @markkuhn @ramprasadg Any chance any of y'all might have a few mins to review this small PR? It looks like it just needs one more approval |
3y after... I am not optimistic ;) |
@pierresouchay Haha idk after that @ramprasadg approval, I'm feeling pretty good about it! :D (@ramprasadg thank you for taking a look!! 🙏). |
When using @metric_scope on a typed function, mypy produces this kind of error:
error: Untyped decorator makes function "handler" untyped
This fix avoid this error and will let people using typehint now having those kind
of error messages.
See https://mypy.readthedocs.io/en/stable/generics.html#declaring-decorators
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.