ruff
a89841e1 - [ty] Implement `TypeVarTuple` support for PEP 695 and legacy syntax

Commit
108 days ago
[ty] Implement `TypeVarTuple` support for PEP 695 and legacy syntax Closes https://github.com/astral-sh/ty/issues/156 Resolves `todo_type!("PEP-695 TypeVarTuple definition types")` and `TODO: support TypeVarTuple properly` comments in test files. - Add `TypeVarKind::TypeVarTuple` and `Pep695TypeVarTuple` variants - Add `TypeVarInstance::is_typevartuple()` helper method - Implement `infer_typevartuple_definition` for PEP 695 type params - Implement `infer_legacy_typevartuple` for `Ts = TypeVarTuple("Ts")` - Fix `SpecialFormType::Unpack` to return TypeVarTuple directly - Fix starred expressions to skip iteration for TypeVarTuples - Add TypeVarTuple extraction in `find_legacy_typevars_impl` - Add traversal for `SubscriptedGeneric`/`SubscriptedProtocol` contexts - Handle both `Type::TypeVar` and `KnownInstanceType::TypeVar` variants - Add `*` prefix for TypeVarTuple and `**` for ParamSpec in display - Update test expectations for TypeVarTuple generic contexts
Author
Committer
Parents
Loading