diff --git a/python_files/normalizeSelection.py b/python_files/normalizeSelection.py index 7ea283cc09a6..d59f07df9e16 100644 --- a/python_files/normalizeSelection.py +++ b/python_files/normalizeSelection.py @@ -22,13 +22,9 @@ def split_lines(source): def _get_statements(selection): """Process a multiline selection into a list of its top-level statements. - 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() != "") diff --git a/src/test/python_files/terminalExec/sample2_normalized_selection.py b/src/test/python_files/terminalExec/sample2_normalized_selection.py index be7b280479c0..a333d4e0daae 100644 --- a/src/test/python_files/terminalExec/sample2_normalized_selection.py +++ b/src/test/python_files/terminalExec/sample2_normalized_selection.py @@ -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) - diff --git a/src/test/python_files/terminalExec/sample2_raw.py b/src/test/python_files/terminalExec/sample2_raw.py index 230abfda89cb..a333d4e0daae 100644 --- a/src/test/python_files/terminalExec/sample2_raw.py +++ b/src/test/python_files/terminalExec/sample2_raw.py @@ -1,12 +1,5 @@ def add(x, y): - """ - - Adds x - to - y - - - """ + """Adds x to y""" # Some comment return x + y