-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer #116049
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pablogsal
commented
Feb 28, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Span for invalid escape sequence in multiline strings is wrong #116042
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.
One nitty comment. Feel free to ignore.
When excessive quotes are present, the error highlight has offset. I suggest to add this test-case as well. "''Incorrect \ logic?"
^^
SyntaxError: invalid escape sequence '\ ' and "'''''''''''''''''''''invalid\ Escape"
^
SyntaxError: invalid escape sequence '\ ' while it works well with single and multiple normal quotes "Incorrect \ logic?"
^^
SyntaxError: invalid escape sequence '\ ' |
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, @pablogsal, I could not cleanly backport this to
|
Sorry, @pablogsal, I could not cleanly backport this to
|
…pes in the tokenizer (pythonGH-116049) (cherry picked from commit 56eda25) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
GH-130065 is a backport of this pull request to the 3.12 branch. |
GH-130066 is a backport of this pull request to the 3.13 branch. |
…pes in the tokenizer (pythonGH-116049) (cherry picked from commit 56eda25) (cherry picked from commit 369704b) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>