Skip to content

[PEP 695] Inherit variance if base class has explicit variance#17787

Merged
JukkaL merged 1 commit into
masterfrom
variance-inherited
Sep 19, 2024
Merged

[PEP 695] Inherit variance if base class has explicit variance#17787
JukkaL merged 1 commit into
masterfrom
variance-inherited

Conversation

@JukkaL

@JukkaL JukkaL commented Sep 19, 2024

Copy link
Copy Markdown
Collaborator

Previously we only inferred variance based on member types, but if a base class has explicit variance for some type variables, we need to consider it as well.

Previously we only inferred variance based on member types, but
if a base class has explicit variance for some type variables, we
need to consider it as well.
@github-actions

Copy link
Copy Markdown
Contributor

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

@JukkaL
JukkaL merged commit a646f33 into master Sep 19, 2024
@JukkaL
JukkaL deleted the variance-inherited branch September 19, 2024 16:44
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