Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #14374

It looks like we need to special-case Self in expand_type() to support it in generics over TypeVar with values, since Self is the only type variable that can legitimately have other type variables in its upper bound.

@github-actions
Copy link
Contributor

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

Copy link
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.

Good to have this fixed in 1.0!

@JukkaL JukkaL merged commit cc1bcc9 into python:master Jan 21, 2023
@ilevkivskyi ilevkivskyi deleted the fix-self-values branch January 21, 2023 18:01
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.

TypeVar with values has incompatible type when used Self
2 participants