ruff/crates/ty_python_semantic/resources/mdtest/generics
Alex Waygood a722df6a73
[ty] Enable even more goto-definition on inlay hints (#21950)
## Summary

Working on py-fuzzer recently (AKA, a Python project!) reminded me how
cool our "inlay hint goto-definition feature" is. So this PR adds a
bunch more of that!

I also made a couple of other minor changes to type display. For
example, in the playground, this snippet:

```py
def f(): ...
reveal_type(f.__get__)
```

currently leads to this diagnostic:

```
Revealed type: `<method-wrapper `__get__` of `f`>` (revealed-type) [Ln 2, Col 13]
```

But the fact that we have backticks both around the type display and
inside the type display isn't _great_ there. This PR changes it to

```
Revealed type: `<method-wrapper '__get__' of function 'f'>` (revealed-type) [Ln 2, Col 13]
```

which avoids the nested-backticks issue in diagnostics, and is more
similar to our display for various other `Type` variants such as
class-literal types (`<class 'Foo'>`, etc., not ``<class `Foo`>``).

## Test Plan

inlay snapshots added; mdtests updated
2025-12-12 12:57:38 -05:00
..
legacy [ty] improve bad specialization results & error messages (#21840) 2025-12-11 19:21:34 -08:00
pep695 [ty] improve bad specialization results & error messages (#21840) 2025-12-11 19:21:34 -08:00
builtins.md [ty] Support using legacy typing aliases for generic classes in type annotations (#18404) 2025-06-03 12:09:51 +01:00
scoping.md [ty] Enable even more goto-definition on inlay hints (#21950) 2025-12-12 12:57:38 -05:00
specialize_constrained.md [ty] Fix non-determinism in `ConstraintSet.specialize_constrained` (#21744) 2025-12-03 10:19:39 -05:00