Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-131507: Add support for syntax highlighting in PyREPL#131562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -2,12 +2,56 @@ | |||
import unicodedata | |||
import functools | |||
from idlelib import colorizer |
Wulian233Mar 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
fromidlelibimportcolorizer
On Windows, if you do not choose to install Tcl/Tk, IDLE will not be available
Seehttps://github.com/python/cpython/blob/main/Tools%2Fmsi%2Ftcltk%2Ftcltk.wixproj
@@ -2,12 +2,56 @@ | |||
import unicodedata | |||
import functools | |||
from idlelib import colorizer | |||
from typing import cast, Iterator, Literal, Match, NamedTuple, Pattern, Self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Here are some deprecated aliases. Although there are no issues at present, it would be better to switch tocollection.abc
https://docs.python.org/3.14/library/typing.html#typing.Iterator
type ColorTag = ( | ||
Literal["KEYWORD"] | ||
| Literal["BUILTIN"] | ||
| Literal["COMMENT"] | ||
| Literal["STRING"] | ||
| Literal["DEFINITION"] | ||
| Literal["SYNC"] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
typeColorTag= ( | |
Literal["KEYWORD"] | |
|Literal["BUILTIN"] | |
|Literal["COMMENT"] | |
|Literal["STRING"] | |
|Literal["DEFINITION"] | |
|Literal["SYNC"] | |
) | |
typeColorTag=Literal["KEYWORD","BUILTIN","COMMENT","STRING","DEFINITION","SYNC"] |
f4bd10f
to75cd06d
CompareHere's what it looks like with the default Ubuntu dark/light themes: ![]() ![]() The contrast of the blue color seems a bit too low for the dark theme (I had the same issue in#132126). Maybe the 'intense' variant might look better? |
Uh oh!
There was an error while loading.Please reload this page.