Skip to content

Allow more precise inference for TypeVarTuple#2237

Merged
JelleZijlstra merged 1 commit intopython:mainfrom
davidhalter:allow_more_precise_literal_in_type_var_tuple
Apr 3, 2026
Merged

Allow more precise inference for TypeVarTuple#2237
JelleZijlstra merged 1 commit intopython:mainfrom
davidhalter:allow_more_precise_literal_in_type_var_tuple

Conversation

@davidhalter
Copy link
Copy Markdown
Contributor

While working on passing the recently changed TypeVarTuple rules (which I'm very happy that they changed), I noticed that Zuban infers Literal[0, 1] instead of int for a TypeVarTuple.

I'm also happy to do this in a different way, but think this is fine and how we usually do this.

@JelleZijlstra JelleZijlstra merged commit ca2a7db into python:main Apr 3, 2026
5 checks passed
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.

4 participants