Skip to content

Conversation

@ambv
Copy link
Contributor

@ambvambv commented Mar 21, 2025

importunicodedata
importfunctools

fromidlelibimportcolorizer
Copy link
Contributor

@Wulian233Wulian233Mar 22, 2025

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

See https://github.com/python/cpython/blob/main/Tools%2Fmsi%2Ftcltk%2Ftcltk.wixproj

importfunctools

fromidlelibimportcolorizer
fromtypingimportcast, Iterator, Literal, Match, NamedTuple, Pattern, Self
Copy link
Contributor

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 to collection.abc

https://docs.python.org/3.14/library/typing.html#typing.Iterator

Comment on lines +20 to +27
type ColorTag= (
Literal["KEYWORD"]
|Literal["BUILTIN"]
|Literal["COMMENT"]
|Literal["STRING"]
|Literal["DEFINITION"]
|Literal["SYNC"]
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type ColorTag= (
Literal["KEYWORD"]
|Literal["BUILTIN"]
|Literal["COMMENT"]
|Literal["STRING"]
|Literal["DEFINITION"]
|Literal["SYNC"]
)
type ColorTag=Literal["KEYWORD", "BUILTIN", "COMMENT", "STRING", "DEFINITION", "SYNC"]

@ambvambvforce-pushed the pyrepl-syntax-highlighting branch from f4bd10f to 75cd06dCompareMarch 22, 2025 12:36
@tomasr8
Copy link
Member

Here'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?

@ambvambv closed this May 1, 2025
@ambvambv deleted the pyrepl-syntax-highlighting branch May 3, 2025 09:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ambv@tomasr8@Viicos@Wulian233