ruff/crates/ty_python_semantic/resources/mdtest/generics
Douglas Creager 9085f18353
[ty] Propagate specializations to ancestor base classes (#17892)
@AlexWaygood discovered that even though we've been propagating
specializations to _parent_ base classes correctly, we haven't been
passing them on to _grandparent_ base classes:
https://github.com/astral-sh/ruff/pull/17832#issuecomment-2854360969

```py
class Bar[T]:
    x: T

class Baz[T](Bar[T]): ...
class Spam[T](Baz[T]): ...

reveal_type(Spam[int]().x) # revealed: `T`, but should be `int`
```

This PR updates the MRO machinery to apply the current specialization
when starting to iterate the MRO of each base class.
2025-05-06 14:25:21 -04:00
..
legacy [ty] Propagate specializations to ancestor base classes (#17892) 2025-05-06 14:25:21 -04:00
pep695 [ty] Propagate specializations to ancestor base classes (#17892) 2025-05-06 14:25:21 -04:00
builtins.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
scoping.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00