PyREPL doesn't correctly color double braces in f-strings / t-strings #134158
Labels
3.14
bugs and security fixes
3.15
new features, bugs and security fixes
stdlib
Python modules in the Lib dir
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Syntax highlighting in PyREPL (added in #131507) does not correctly color the double-braces used for escaping braces in f-strings or t-strings:
After investigation, this is caused by Python tokenizer producing only 1 brace in this case:
So PyREPL think there is only one brace in the original string, and doesn't color the second one.
I have a fix for this issue, PR on the way!
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
Windows, macOS
Linked PRs
The text was updated successfully, but these errors were encountered: