Skip to content

Correctly handle runtime type applications of variadic types#16240

Merged
ilevkivskyi merged 2 commits intopython:masterfrom
ilevkivskyi:fix-tvt-runtime-type-app
Oct 15, 2023
Merged

Correctly handle runtime type applications of variadic types#16240
ilevkivskyi merged 2 commits intopython:masterfrom
ilevkivskyi:fix-tvt-runtime-type-app

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

This adds some missing pieces to runtime type application handling for both TypeVarTuple and ParamSpec. Everything is straightforward (maybe a bit hacky, but we already import typeanal in checkexpr for similar purposes, e.g. type aliases in runtime context).

Fixes #14799

@github-actions

This comment has been minimized.

@ilevkivskyi
Copy link
Copy Markdown
Member Author

This (and other 3 PRs on variadic types) are open for a week now. I will start merging them without review, one per day, starting from the most trivial one.

@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. ✅

@ilevkivskyi ilevkivskyi merged commit ff9deb3 into python:master Oct 15, 2023
@ilevkivskyi ilevkivskyi deleted the fix-tvt-runtime-type-app branch October 15, 2023 20: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.

ParamSpec readability simplification causes weird behavior

1 participant