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 some TypeVarTuple Callable edge cases. #15254

Closed
wants to merge 1 commit into from

Conversation

jhance
Copy link
Collaborator

@jhance jhance commented May 16, 2023

Previously we mostly only tested substituting in concrete values to Callables (see tests in PR). Now we test in substituting Unpack[Args], etc. Prefices and suffices are not implemented yet because they seem very nontrivial to get working.

We also test what happens when the submit function in the test case is defined using ParamSpec but we pass in an Unpack through *args, and we fix a crash related to that scenario.

Previously we mostly only tested substituting in concrete values to
Callables (see tests in PR). Now we test in substituting Unpack[Args],
etc. Prefices and suffices are not implemented yet because they seem
very nontrivial to get working.

We also test what happens when the `submit` function in the test case
is defined using ParamSpec but we pass in an Unpack through *args, and
we fix a crash related to that scenario.
@github-actions
Copy link
Contributor

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

@ilevkivskyi
Copy link
Member

Superseded by #16198

ilevkivskyi added a commit that referenced this pull request Sep 28, 2023
Supersedes #15254

Note the error message for one of the test is slightly different.
Although it _may_ suggest that `Unpack[...]` is a valid type on its own,
this error is kind of more consistent with old style `*args: int`
annotations.
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