| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| class Syntax(ThemeSection): | ||
| prompt: str = ANSIColors.BOLD_MAGENTA | ||
| keyword: str = ANSIColors.BOLD_BLUE | ||
| keyword_constant: str = ANSIColors.BOLD_BLUE |
There was a problem hiding this comment.
And so the question is, do we want to change this for pyrepl?
Sorry, something went wrong.
There was a problem hiding this comment.
I agree with the issue OP that the is None in particular being in the same color looks strange.
Sorry, something went wrong.
There was a problem hiding this comment.
It could default to ANSIColors.CYAN, since True, False, and None would then be the same color as all the built-ins.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm happy letting people customize it but I don't think None/True/False should be highlighted as builtins by default. They can't be accessed by builtins.None (causes a SyntaxError) and can't be overridden (again, a SyntaxError). I would keep the default as is.
The reason you want it highlighted like builtins is because historically they were just default values in the builtin scope, therefore highlighters treated them as such. That's no longer the case, they are actual keywords now.
Sorry, something went wrong.
| @@ -0,0 +1,2 @@ | |||
| Expand ``_colorize`` theme with ``keyword_colorize`` and implement in | |||
There was a problem hiding this comment.
I think keyword_colorize was meant to be keyword_constant here.
Sorry, something went wrong.
|
Thanks @StanFromIreland for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
|
GH-138928 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I am not a fan of constant, but it seems to be what Pypygments and Magicpython uses so I guess it is best?
As for the other parts of the proposal in the issue I am not as big a fan, but I think this one is fine, and something I myself am used to in editors.