Skip to content
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

Hitting enter after the first part of a multiline string generates invalid quotes #6961

Open
rchiodo opened this issue Feb 19, 2025 · 3 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Feb 19, 2025

x = """<-- Cursor here, hit enter

Expected result:

x="""

Actual result:

x = """"
"
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Feb 19, 2025
@rchiodo rchiodo assigned KacieKK and unassigned rchiodo Feb 19, 2025
@sdudley-bsc
Copy link

@rchiodo, I encounter a similar issue when using Pylance version 2025.3.1. Actual result:

x = """" \
"

I do not encounter that issue when using Pylance version 2025.2.1.

@debonte
Copy link
Contributor

debonte commented Mar 8, 2025

@sdudley-bsc, what did the line look like before you pressed Enter? And where was the cursor when you pressed Enter?

I tried several scenario trying to hit what you show above and couldn't make it happen.

@rchiodo
Copy link
Contributor Author

rchiodo commented Mar 8, 2025

This repros for me:

x = """| <-- cursor here

then hit enter:

x = """" \
"

When really what I wanted was this:

x = """

Or maybe this:

x = """ \
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

4 participants