From 6fec29d77802ff68b5e76fb55c6949df7ac0443a Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 22 Jun 2016 00:27:21 +0200 Subject: [PATCH] All tests except the Interpreter tests are working again. --- jedi/api/helpers.py | 2 +- jedi/parser/fast.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jedi/api/helpers.py b/jedi/api/helpers.py index dd5a97bb..4f92b09f 100644 --- a/jedi/api/helpers.py +++ b/jedi/api/helpers.py @@ -6,7 +6,7 @@ from collections import namedtuple from jedi import common from jedi.evaluate import imports -from jedi.evaluate.helpers import deep_ast_copy, call_of_leaf +from jedi.evaluate.helpers import call_of_leaf from jedi import parser from jedi.parser import tokenize, token diff --git a/jedi/parser/fast.py b/jedi/parser/fast.py index af372542..291243d9 100644 --- a/jedi/parser/fast.py +++ b/jedi/parser/fast.py @@ -532,7 +532,8 @@ class FastTokenizer(object): self._parentheses_level = 0 # We need to simulate a newline before the indent, because the # open parentheses ignored them. - previous_type = NEWLINE + if re.search('\n\s*', prefix): + previous_type = NEWLINE # Parentheses ignore the indentation rules. The other three stand for # new lines.