mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-24 17:16:53 +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 | ||