ruff/crates/ty_python_semantic/resources/mdtest/annotations
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
..
annotated.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
any.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
callable.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
deferred.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
int_float_complex.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
invalid.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
literal.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
literal_string.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
never.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
new_types.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
optional.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
starred.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
stdlib_typing_aliases.md [ty] Propagate specializations to ancestor base classes (#17892) 2025-05-06 14:25:21 -04:00
string.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
union.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
unsupported_special_forms.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
unsupported_special_types.md Generalize special-casing for enums constructed with the functional syntax (#17885) 2025-05-06 11:02:55 +01:00
unsupported_type_qualifiers.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00