KEMBAR78
Forbid `.pop` of `Readonly` `NotRequired` TypedDict items by sterliakov · Pull Request #19133 · python/mypy · GitHub
Skip to content

Conversation

sterliakov
Copy link
Collaborator

Fixes #19130. We already have these checks for del typed_dict["readonly_notrequired_key"], this just aligns .pop() logic with that.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thanks!

@JelleZijlstra JelleZijlstra merged commit a8ec893 into python:master May 23, 2025
18 checks passed
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.

False negative: popping a ReadOnly key from a TypedDict

2 participants