From 0a42b8611675af719577fa2fa85ea9ddfa720452 2018-10-01 23:30:28 From: Bart Skowron Date: 2018-10-01 23:30:28 Subject: [PATCH] Fix regression... --- diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py index 3c992d8..63cf1d7 100644 --- a/IPython/core/inputtransformer2.py +++ b/IPython/core/inputtransformer2.py @@ -636,7 +636,7 @@ class TransformerManager: MemoryError, SyntaxWarning): return 'invalid', None else: - if not lines[-1].strip().endswith(':'): + if len(lines) > 1 and not lines[-1].strip().endswith(':'): return 'incomplete', find_last_indent(lines) return 'complete', None