Skip to content

Fix recursive TypedDicts/NamedTuples defined with call syntax#14488

Merged
JukkaL merged 1 commit intopython:masterfrom
ilevkivskyi:fix-recursive-td
Jan 21, 2023
Merged

Fix recursive TypedDicts/NamedTuples defined with call syntax#14488
JukkaL merged 1 commit intopython:masterfrom
ilevkivskyi:fix-recursive-td

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #14460

Recursive TypedDicts/NamedTuples defined with call syntax that have item types that look like type applications suffer the same chicken-and-egg problem that recursive type aliases. Fortunately, there is a very simple way to distinguish them without fully analyzing rvalues, this is what this PR does.

@github-actions
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks!

@JukkaL JukkaL merged commit 272c8fd into python:master Jan 21, 2023
@ilevkivskyi ilevkivskyi deleted the fix-recursive-td branch January 21, 2023 14:08
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.

Different behaviour for recursive TypedDict defined as class/functional

2 participants