-
Notifications
You must be signed in to change notification settings - Fork 397
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(tracer): mypy generic to preserve decorated method signature #529
fix(tracer): mypy generic to preserve decorated method signature #529
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #529 +/- ##
===========================================
- Coverage 99.23% 99.19% -0.05%
===========================================
Files 113 113
Lines 4468 4476 +8
Branches 243 243
===========================================
+ Hits 4434 4440 +6
- Misses 22 24 +2
Partials 12 12
Continue to review full report at Codecov.
|
Limitation: Async functions signature for type checking can only be preserved by using ParamSpec introduced in 3.10 - PEP 612 We could bring typing_extensions module (240K) which also brings other fixes we'll likely encounter as we adopt mypy more broadly in this lib, including nice features like Protocol for interfaces. I'll postpone bringing cc @michaelbrewer @pcolazurdo @cakepietoast |
* develop: chore(deps): bump boto3 from 1.18.0 to 1.18.1 (aws-powertools#528) fix(tracer): mypy generic to preserve decorated method signature (aws-powertools#529) fix(parser): Make ApiGateway version, authorizer fields optional (aws-powertools#532) fix(mypy): fixes to resolve no implicit optional errors (aws-powertools#521) chore(deps): bump boto3 from 1.17.110 to 1.18.0 (aws-powertools#527) feat(feat-toggle): New simple feature toggles rule engine (WIP) (aws-powertools#494) chore(deps-dev): bump mkdocs-material from 7.1.9 to 7.1.10 (aws-powertools#522) chore(deps): bump boto3 from 1.17.102 to 1.17.110 (aws-powertools#523) chore(deps-dev): bump isort from 5.9.1 to 5.9.2 (aws-powertools#514) feat(mypy): add mypy support to makefile (aws-powertools#508) feat(api-gateway): add debug mode (aws-powertools#507)
…ent-subclass * develop: fix(api-gateway): non-greedy route pattern regex (aws-powertools#533) chore(deps): bump boto3 from 1.18.0 to 1.18.1 (aws-powertools#528) fix(tracer): mypy generic to preserve decorated method signature (aws-powertools#529) fix(parser): Make ApiGateway version, authorizer fields optional (aws-powertools#532) fix(mypy): fixes to resolve no implicit optional errors (aws-powertools#521) chore(deps): bump boto3 from 1.17.110 to 1.18.0 (aws-powertools#527)
Issue #, if available: #465
Description of changes:
Checklist
Use generic awaitable upper bound to preserve signature for type checker (mypy)Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.