ruff/crates/ty_python_semantic
Ibraheem Ahmed c5d654bce8
[ty] Improve literal promotion heuristics (#21439)
## Summary

Extends literal promotion to apply to any generic method, as opposed to
only generic class constructors. This PR also improves our literal
promotion heuristics to only promote literals in non-covariant position
in the return type, and avoid promotion if the literal is present in
non-covariant position in any argument type.

Resolves https://github.com/astral-sh/ty/issues/1357.
2025-11-14 16:13:56 -05:00
..
resources [ty] Improve literal promotion heuristics (#21439) 2025-11-14 16:13:56 -05:00
src [ty] Improve literal promotion heuristics (#21439) 2025-11-14 16:13:56 -05:00
tests [ty] Limit shown import paths to at most 5 unless ty runs with -v (#20912) 2025-10-16 13:18:09 +02:00
build.rs
Cargo.toml [ty] Some more simplifications when rendering constraint sets (#21009) 2025-10-22 13:38:44 -04:00
mdtest.py [ty] Press 'enter' to rerun all mdtests (#21427) 2025-11-13 15:34:17 +01:00
mdtest.py.lock