-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
The lines in tokens from tokenize.generate_tokens
incorrectly indicate multiple lines.
#104972
Comments
The tip of 3.12 shows one more style of change, due to omitting the newlines from
|
CC: @mgmacias95 |
…e module are correct
…e module are correct Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…e module are correct Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…e module are correct Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…e module are correct (pythonGH-104975) (cherry picked from commit 3fdb55c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@nedbat can you check with |
If you set automerge on the backport, the usual test-hypothesis failure disabled it. I merged it. |
@pablogsal Gorgeous! Thanks for the quick turnaround. |
Thanks a lot @terryjreedy ! |
The line attribute in tokens returned by
tokenize.generate_tokens
incorrectly indicate multiple lines. The tokens should have an invariant that using the.start
and.end
attributes to index into the.line
attribute will produce the.string
attribute.tokbug.py:
Run with 3.12.0a7:
Run with 3.12.0b1:
Related to #104825? cc @pablogsal
Linked PRs
The text was updated successfully, but these errors were encountered: