-
Notifications
You must be signed in to change notification settings - Fork 421
fix(typing): make Response headers covariant #3745
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(typing): make Response headers covariant #3745
Conversation
https://docs.python.org/3/library/typing.html#typing.Dict Note that to annotate arguments, it is preferred to use an abstract collection type such as Mapping rather than to use dict or typing.Dict.
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #3745 +/- ##
========================================
Coverage 96.38% 96.38%
========================================
Files 214 214
Lines 10030 10030
Branches 1846 1846
========================================
Hits 9667 9667
Misses 259 259
Partials 104 104 ☔ View full report in Codecov by Sentry. |
|
thank you @wurstnase for this quick fix w/ Mapping generic. Everyone appreciates it :) |
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #3743
Summary
Changes
Change typing for
headers
inResponse
constructor.User experience
Able to use covariant of dicts, e.g.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.