Skip to content

Overload Headers.get like the mapping types - #95

Merged
tiran merged 1 commit into
mainfrom
headers-protocol-overloads
Nov 16, 2026
Merged

tiran merged 1 commit into
mainfrom
headers-protocol-overloads

Conversation

@tiran

@tiran tiran commented Nov 16, 2026

Copy link
Copy Markdown
Owner

get(key) returns str | None and get(key, default) returns str, as in typeshed's Mapping.get. The standard header mappings now verify against the protocol, so the backends drop their type: ignore comments.

get(key) returns str | None and get(key, default) returns str, as in
typeshed's Mapping.get. The standard header mappings now verify against
the protocol, so the backends drop their type: ignore comments.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: Christian Heimes <christian@python.org>
@tiran
tiran merged commit b2b1758 into main Nov 16, 2026
10 checks passed
@tiran
tiran deleted the headers-protocol-overloads branch November 16, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant