FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

conformance: make open TypedDict extra kwargs optional by charliermarsh · Pull Request #2301 · python/typing · GitHub

/ typing Public

conformance: make open TypedDict extra kwargs optional - #2301

Merged
carljm merged 1 commit into
python:mainfrom
charliermarsh:charlie/optional-open-typeddict-unpack-extra-key
Jun 5, 2026
Merged

conformance: make open TypedDict extra kwargs optional#2301
carljm merged 1 commit into
python:mainfrom
charliermarsh:charlie/optional-open-typeddict-unpack-extra-key

Conversation

Copy link
Copy Markdown
Contributor

Summary

#2272 made errors optional when an extra keyword is passed to **kwargs: Unpack[OpenTypedDict], modifying the expectation in callables_kwargs.py. But typeddicts_extra_items.py contains the same case:

class MovieNoExtra(TypedDict):
    name: str

def unpack_no_extra(**kwargs: Unpack[MovieNoExtra]) ->
None: ...

unpack_no_extra(name="No Country for Old Men",
year=2007)  # E?

This PR marks the duplicate case optional, for consistency with #2272.

charliermarsh force-pushed the charlie/optional-open-typeddict-unpack-extra-key branch from 68e0010 to 4d8dbf9 Compare June 5, 2026 11:06

JelleZijlstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Agree this seems exactly analogous to the change in #2272.

carljm merged commit 735dba9 into python:main Jun 5, 2026
5 checks passed
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 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.

3 participants


Back | FazBrowse Home | New Git URL