ruff/crates/ty_python_semantic/resources/mdtest/scopes
Douglas Creager 06cd249a9b
[ty] Track different uses of legacy typevars, including context when rendering typevars (#19604)
This PR introduces a few related changes:

- We now keep track of each time a legacy typevar is bound in a
different generic context (e.g. class, function), and internally create
a new `TypeVarInstance` for each usage. This means the rest of the code
can now assume that salsa-equivalent `TypeVarInstance`s refer to the
same typevar, even taking into account that legacy typevars can be used
more than once.

- We also go ahead and track the binding context of PEP 695 typevars.
That's _much_ easier to track since we have the binding context right
there during type inference.

- With that in place, we can now include the name of the binding context
when rendering typevars (e.g. `T@f` instead of `T`)
2025-08-01 12:20:32 -04:00
..
builtin.md [ty] Track different uses of legacy typevars, including context when rendering typevars (#19604) 2025-08-01 12:20:32 -04:00
eager.md [ty] improve lazy scope place lookup (#19321) 2025-07-25 07:11:11 +00:00
global-constants.md [ty] Add support for global __debug__ constant (#18540) 2025-06-10 06:48:59 +00:00
global.md [ty] perform type narrowing for places marked `global` too (#19381) 2025-07-22 16:42:10 -07:00
moduletype_attrs.md [ty] Consistent use of American english (in rules) (#19488) 2025-07-22 16:10:38 +02:00
nonlocal.md [ty] improve lazy scope place lookup (#19321) 2025-07-25 07:11:11 +00:00
unbound.md Update class literal display to use `<class 'Foo'>` style (#17889) 2025-05-06 20:11:25 -04:00