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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
|
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
headersinResponseconstructor.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.