From 7a170532d9af2066f79f8e2822cce4edafc7ae3d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 6 Jun 2016 09:22:50 +0200 Subject: [PATCH] Now finally all tests are running again (except the repl completion, which is a separate issue). --- jedi/api/helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jedi/api/helpers.py b/jedi/api/helpers.py index 6cda2d06..f96be507 100644 --- a/jedi/api/helpers.py +++ b/jedi/api/helpers.py @@ -131,6 +131,10 @@ def get_stack_at_position(grammar, source, module, pos): raise OnErrorLeaf(user_stmt) code = _get_code(source, user_stmt.start_pos, pos) + if code == ';': + # ; cannot be parsed. + code = '' + # Remove whitespace at the end. Necessary, because the tokenizer will parse # an error token (there's no new line at the end in our case). This doesn't # alter any truth about the valid tokens at that position.