Use "python" for markdown code fences in on-hover content#19082
Use "python" for markdown code fences in on-hover content#19082dhruvmanila merged 1 commit intomainfrom
Conversation
|
I didn't test this in an editor, that seems harder than finding the place to change this literal :) |
|
Instead of "text"
I tried in VS Code and everything looks kind of nice, actually. I don't see any invalid syntax highlighting. |
|
I guess that would be dependent on the color scheme. Regardless, I think this should be fine. I'm not even sure whether the red color is coming from it being a syntax error. For the color scheme that I use (Gruvbox), the keywords are highlighted as red, so I only see the red color for keywords e.g., in |
|
I will defer to ya'll for sure. |
carljm
left a comment
There was a problem hiding this comment.
If the results here aren't obviously bad, then I think we should go ahead and do it. It's clearly what we want, and it will help us find and motivate us to fix any specific cases where our type display doesn't work well with Python syntax highlighting.



Instead of "text".
Closes astral-sh/ty#749
We may not want this because the type display implementations are not guaranteed to be valid Python, however, unless they're going to highlight invalid syntax this seems like a better interim value than "text"? I'm not the expert though. See astral-sh/ty#749 (comment) for prior commentary.
edit: Going back further to #17057 (comment) for prior context, it turns out they do highlight invalid syntax in red which is quite unfortunate and probably a blocker here.