mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-21 15:52:34 +00:00
![]() ## Summary Avoid literal promotion when a literal type annotation is provided, e.g., ```py x: list[Literal[1]] = [1] ``` Resolves https://github.com/astral-sh/ty/issues/1198. This does not fix issue https://github.com/astral-sh/ty/issues/1284, but it does make it more relevant because after this change, it is possible to directly instantiate a generic type with a literal specialization. |
||
---|---|---|
.. | ||
annotations.md | ||
augmented.md | ||
multi_target.md | ||
unbound.md | ||
walrus.md |