GeezerVison is showing github.com — Implement support for closed TypedDicts (PEP 728) by alicederyn · Pull Request #21382 · python/mypy
Implement support for closed TypedDicts (PEP 728)
#21382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
fa59235
Support nested special forms in functional syntax
alicederyn Apr 29, 2026
c06fef7
Subtypes fix: required keys must remain required
alicederyn Apr 22, 2026
4a82d3c
Meet fix: mutable keys must remain mutable
alicederyn Apr 22, 2026
ca099f4
Improve TypedDict meet
alicederyn Apr 22, 2026
f79ba70
Join fix: readonly keys must remain readonly
alicederyn Apr 22, 2026
2ed7992
Improve TypedDict join
alicederyn Apr 22, 2026
ab1a151
Expand TypedDict subclassing tests
alicederyn May 1, 2026
e626c19
Support type refinement in TypedDict subclasses
alicederyn May 1, 2026
d8c619d
Fix TypeAnalyser to retain readonly keys
alicederyn Apr 30, 2026
e7372e4
Narrow on explicitly uninhabited keys
alicederyn Apr 30, 2026
c7115c1
Support parsing TypedDict closed keyword
alicederyn Apr 23, 2026
bce4b17
Implement closed support in TypedDict subtyping
alicederyn Apr 27, 2026
90cb21f
Implement closed support in subclassing
alicederyn Apr 24, 2026
4106525
Implement closed support in join logic
alicederyn Apr 28, 2026
6cc0d63
Implement closed support in meet logic
alicederyn Apr 29, 2026
5bfcc43
Implement closed support in narrowing
alicederyn Apr 30, 2026
d7449df
Implement TypeVar support in narrowing
alicederyn Apr 30, 2026
2621704
Implement closed support in astdiff
alicederyn Apr 30, 2026
34a13de
Implement closed support in stubgen
alicederyn Apr 30, 2026
87ede99
Implement closed support in serialization
alicederyn Apr 30, 2026
bbdd827
Implement closed support in TypeAnalyser
alicederyn Apr 30, 2026
c1ff8b3
Implement closed support in unpacking
alicederyn Apr 30, 2026
ca5a13f
Implement closed support in expandtype
alicederyn May 1, 2026
4d3a7b0
Implement closed support in get method
alicederyn May 1, 2026
877e000
Merge branch 'master' into closed.keyword
alicederyn May 19, 2026
6f3291b
Fix bug with join and Any
alicederyn May 19, 2026
776eb10
Fix bug with meet and Any
alicederyn May 19, 2026
05d3a4b
Refactor common logic into zipall
alicederyn May 19, 2026
022a501
Fix assumption that missing items are ReadOnly
alicederyn May 19, 2026
bd05e88
Allow adding Never items to closed subtypes
alicederyn May 19, 2026
d102505
Reword not-required compatibility error messages
alicederyn May 19, 2026
9279a01
Test case from no error to error
alicederyn May 19, 2026
2d1333c
Delay subtype validation to TypeChecker
alicederyn May 18, 2026
4ee7856
Add closed keyword to TypedDict docs
alicederyn May 20, 2026
8bcc243
Store validation information in TypeInfo
alicederyn May 26, 2026
77e8a59
Link TypedDict branch narrowing to test cases
alicederyn May 26, 2026
4261abb
Remove references to 'MRO'
alicederyn May 26, 2026
8d92a10
Extend subclass tests with subtype checks
alicederyn May 26, 2026
37481a2
Merge branch 'master' into closed.keyword
alicederyn May 26, 2026
42ec16f
Manually wrap strings/comments
alicederyn Jun 1, 2026
5cbb687
Remove unnecessary extra newline
alicederyn Jun 1, 2026
31b5045
Document new TypedDict inheritance rules
alicederyn Jun 1, 2026
fbd2818
Merge branch 'master' into closed.keyword
alicederyn Jun 2, 2026
File filter
Filter by extension
.test
(1)
All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
Remove unnecessary extra newline
Loading branch information
Uh oh!
There was an error while loading. Please reload this page.
commit 5cbb687e77bf764c8319e40894cf30922356c100
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Original file line number
Diff line number
Diff line change
Expand Up
@@ -5188,7 +5188,6 @@ reveal_type(j(c, b)) # N: Revealed type is "TypedDict({'x'?=: builtins.int})"
[typing fixtures/typing-typeddict.pyi]
# Closed
# See https://peps.python.org/pep-0728/
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.