diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py index 77b905c..5777559 100644 --- a/IPython/core/inputtransformer2.py +++ b/IPython/core/inputtransformer2.py @@ -644,7 +644,6 @@ class TransformerManager: and tokens_by_line[-1][-1].type in newline_types: tokens_by_line.pop() - while tokens_by_line[-1] and tokens_by_line[-1][-1].type in newline_types: tokens_by_line[-1].pop() @@ -681,9 +680,6 @@ class TransformerManager: return 'complete', None return 'incomplete', find_last_indent(lines) - if len(tokens_by_line[-1]) <= 1: - return 'incomplete', find_last_indent(lines) - # If there's a blank line at the end, assume we're ready to execute if not lines[-1].strip(): return 'complete', None