Skip to content

Allow recursive aliases at class scope - #13754

Merged
hauntsaninja merged 1 commit into
python:masterfrom
ilevkivskyi:allow-class-rec-aliases
Sep 28, 2022
Merged

hauntsaninja merged 1 commit into
python:masterfrom
ilevkivskyi:allow-class-rec-aliases

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

As mypy_primer in #13516 shows, some people actually use this, and I don't see any good reason to not allow this. (Note: I tried to enable the same for recursive NamedTuples and TypedDicts, but this affects how nested classes work in general, so people will need to use qualified names there).

@github-actions

Copy link
Copy Markdown
Contributor

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

@hauntsaninja
hauntsaninja merged commit 2562140 into python:master Sep 28, 2022
@ilevkivskyi
ilevkivskyi deleted the allow-class-rec-aliases branch September 28, 2022 21:45
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.

2 participants