Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
ambv wants to merge3 commits intopython:mainfromambv:pyrepl-syntax-highlighting

Conversation

ambv
Copy link
Contributor

@ambvambv commentedMar 21, 2025
edited by bedevere-appbot
Loading

neutrinoceros reacted with heart emoji
@@ -2,12 +2,56 @@
import unicodedata
import functools

from idlelib import colorizer
Copy link
Contributor

@Wulian233Wulian233Mar 22, 2025
edited
Loading

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
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 tocollection.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
typeColorTag= (
Literal["KEYWORD"]
|Literal["BUILTIN"]
|Literal["COMMENT"]
|Literal["STRING"]
|Literal["DEFINITION"]
|Literal["SYNC"]
)
typeColorTag=Literal["KEYWORD","BUILTIN","COMMENT","STRING","DEFINITION","SYNC"]

@ambvambvforce-pushed thepyrepl-syntax-highlighting branch fromf4bd10f to75cd06dCompareMarch 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 thisMay 1, 2025
@ambvambv deleted the pyrepl-syntax-highlighting branchMay 3, 2025 09:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ViicosViicosViicos left review comments

@Wulian233Wulian233Wulian233 left review comments

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@ambv@tomasr8@Viicos@Wulian233

[8]ページ先頭

©2009-2025 Movatter.jp