-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Multiline literal types in CRLF ending files are not normalized to LF #9681
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Comments
erictraut
added a commit
that referenced
this issue
Jan 10, 2025
…RLF to LF within multi-line triple-quoted strings so the behavior is consistent with runtime. This addresses #9681.
erictraut
added a commit
that referenced
this issue
Jan 10, 2025
…RLF to LF within multi-line triple-quoted strings so the behavior is consistent with runtime. This addresses #9681.
erictraut
added a commit
that referenced
this issue
Jan 10, 2025
…RLF to LF within multi-line triple-quoted strings so the behavior is consistent with runtime. This addresses #9681.
Thanks for the bug report. I couldn't find any official documentation that indicates this is the behavior of the Python runtime, but I confirmed the behavior through experimentation. I've updated pyright's logic accordingly. This will be addressed in the next release. |
erictraut
added
the
addressed in next version
Issue is fixed and will appear in next published version
label
Jan 10, 2025
This is included in pyright 1.1.392. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Comparing a type of a multiline literal in a file with CRLF line ending does not match the same literal in a file with LF ending.
This makes the code below type check if the file has CF line ending, but error if the file has a CRLF line ending.
running the file prints
'a\nb'
in both cases, so the line ending of the python file should not matter.VS Code extension or command-line
Tested with both the pylance extension and the pyright command line tool version
1.1.391
Error returned, with CRLF file:
The text was updated successfully, but these errors were encountered: