ruff/crates/ty_python_semantic/resources/mdtest/assignment
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
..
annotations.md [ty] Improve literal promotion heuristics (#21439) 2025-11-14 16:13:56 -05:00
augmented.md [ty] Remove special casing for tuple addition (#19636) 2025-07-30 16:25:42 +00:00
multi_target.md
unbound.md
walrus.md