Enhance type of headers.get method.#2129
Merged
davidism merged 1 commit intopallets:2.0.xfrom May 17, 2021
Merged
Conversation
Member
|
This should probably be rebased against |
When given a default value that is not None, the get method always returns a string.
Contributor
Author
|
Thanks @ThiefMaster , I hadn't seen that there was a new dev version in the works. |
Member
|
It seems you've made this PR from an organization account instead of your own, which means I can't push to it to prepare it for merge. Try to avoid this in the future, it's more convenient for maintainers to be able to modify PRs in place. |
Contributor
Author
|
@davidism , sorry about that. I thought I had set the "maintainers can modify" flag. I'll be careful next time |
Member
|
From my experience, the setting doesn't seem to work on org prs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When given a default value that is not
None, the get method always returns a string.request.headers.getmethod #2128I haven't seen any tests that checks for the types themselves, although I've changed one instance of usage in the werkzeug code itself that would fail without the typing change.
Checklist:
CHANGES.rstsummarizing the change and linking to the issue.pre-commithooks and fix any issues.pytestandtox, no tests failed.