Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --export-ref-info with type variable with value restrictions #15285

Merged
merged 4 commits into from
May 23, 2023

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented May 22, 2023

The regular function body has no type information if the function uses
a type variable with a value restriction in its signature. Instead look
at the expanded versions of the function body. This will produce
duplicate references for some expressions, but that seems benign.

Also add a foundation for writing tests for --export-ref-info and add a
few test cases.

JukkaL and others added 4 commits May 22, 2023 16:52
The regular function body has no type information if the function uses
a type variable with a value restriction in its signature. Instead look
at the expanded versions of the function body. This will produce
duplicate references for some expressions, but that seems benign.

Also add a foundation for writing tests for --export-ref-info and add a
few test cases.
@github-actions
Copy link
Contributor

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

@JukkaL JukkaL merged commit 1ee465c into master May 23, 2023
@JukkaL JukkaL deleted the export-types-typevar-values branch May 23, 2023 10:29
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