Open dhruvmanila opened 11 hours ago
Looking at something like:
from typing import Literal, reveal_type x: Literal["\n"] = "\n" reveal_type(x)
We get:
red-knot: Revealed type is `Literal[" "]` [revealed-type] Pyright: Type of "e" is "Literal['\n']" mypy: Revealed type is "Literal['\n']"
I think it would be useful to not render the characters and instead display it as raw instead similar to Pyright and mypy.
We could try using https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug when displaying Literal
Looking at something like:
We get:
I think it would be useful to not render the characters and instead display it as raw instead similar to Pyright and mypy.