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

Revert "Do not truncate whitespace for multi-line string" (#24096) #24099

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions python_files/normalizeSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ def _get_statements(selection):
This will remove empty newlines around and within the selection, dedent it,
and split it using the result of `ast.parse()`.
"""
if '"""' in selection or "'''" in selection:
yield selection
return

# Remove blank lines within the selection to prevent the REPL from thinking the block is finished.
lines = (line for line in split_lines(selection) if line.strip() != "")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
def add(x, y):
"""
Adds x
to
y
"""
"""Adds x to y"""
# Some comment
return x + y

v = add(1, 7)
print(v)

10 changes: 2 additions & 8 deletions src/test/python_files/terminalExec/sample2_raw.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
def add(x, y):
"""
Adds x
to
y
"""
"""Adds x to y"""
# Some comment

return x + y

v = add(1, 7)
Expand Down
Loading