Skip to content

support conditional fields on TypedDict and NamedTuple#2263

Open
carljm wants to merge 2 commits intopython:mainfrom
carljm:condfield
Open

support conditional fields on TypedDict and NamedTuple#2263
carljm wants to merge 2 commits intopython:mainfrom
carljm:condfield

Conversation

@carljm
Copy link
Copy Markdown
Member

@carljm carljm commented Apr 17, 2026

We reached consensus on this a while back in this Discuss thread, but I never got around to actually making the PR.

Seems like in the meantime we accidentally implemented the strict version of the check for TypedDict in ty, but astral-sh/ruff#24702 fixes that. Happy to wait a bit to land this if other type checkers want to have conforming implementations ready, too.

Comment thread docs/spec/typeddict.rst Outdated
@carljm carljm requested a review from davidhalter April 18, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: conformance tests Issues with the conformance test suite topic: typing spec For improving the typing spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants