From bd7a4c2d4abf3e5b765cfc04eb7fde67fa6822ea 2018-10-06 16:32:44 From: Tony Fast Date: 2018-10-06 16:32:44 Subject: [PATCH] Remove a condition from check_complete Co-Authored-By: Nicholas Bollweg --- 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