Skip to content

[email] Complete header value parser annotations - #16885

Open
ibrahimmaq14 wants to merge 1 commit into
python:mainfrom
ibrahimmaq14:fix/email-header-parser-annotations
Open

ibrahimmaq14 wants to merge 1 commit into
python:mainfrom
ibrahimmaq14:fix/email-header-parser-annotations

Conversation

@ibrahimmaq14

Copy link
Copy Markdown
Contributor

Part of #14031.

Specify get_word() as returning tuple[Atom | QuotedString, str] and ContentDisposition.content_disposition as str | None, matching CPython's word parser and content disposition parser.

mypy and Pyright reported two assert_type mismatches before the change and zero afterward. Runtime probes passed on CPython 3.10–3.15, and python tests/runtests.py stdlib/email passed.

OpenAI Codex investigated, wrote, and tested this change.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@ibrahimmaq14
ibrahimmaq14 marked this pull request as ready for review November 24, 2026 10:38

This branch has not been deployed

No deployments
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