mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
## Summary Today, ty panics on `class C(*(int, Generic[T, U]))` when `T` has a default and `U` is required. To locate the error, ty looks for the second base in the class header. The header contains a single starred expression that expands to two bases. This PR changes the diagnostic to use the source expression ty recorded for each base during expansion, following #24695 and #24699. The diagnostic now underlines `T, U` and reports that a required type parameter cannot follow one with a default. Added an mdtest that checks the diagnostic on the unpacked generic base.