ruff
9e5424f0 - [ty] Preserve TypeVarTuple context during Generic recovery (#27381)

Commit
110 days ago
[ty] Preserve TypeVarTuple context during Generic recovery (#27381) ## Summary Prior to this change, we recovered an invalid `Generic[Shape]` subscription as `Unknown`. That lost the class's generic context and caused a cascading diagnostic for a correctly unpacked use: ```py Shape = TypeVarTuple("Shape") class ClassA(Generic[Shape]): # invalid-generic-class values: tuple[*Shape] # Previously: unbound-type-variable ``` We now preserve the bound `TypeVarTuple` in the recovery type while still reporting the invalid bare argument. This removes only the spurious `unbound-type-variable` diagnostic and makes `generics_typevartuple_basic.py` fully conformant.
Author
Parents
Loading