From 658e5833ce6ca88bdc5b3e15c83f3d08e99b2f97 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 18 Oct 2012 22:00:13 +0200 Subject: [PATCH] Import missed a get_set_vars function, which caused an error with user_stmt checking -> fixes issue 16 of jedi-vim --- jedi/parsing.py | 3 +++ test/completion/imports.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/jedi/parsing.py b/jedi/parsing.py index 2dbb2340..64361653 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -570,6 +570,9 @@ class Import(Simple): else: return [self.namespace] + def get_set_vars(self): + return self.get_defined_names() + def get_all_import_names(self): n = [] if self.from_ns: diff --git a/test/completion/imports.py b/test/completion/imports.py index f8ab6f03..e694a14b 100644 --- a/test/completion/imports.py +++ b/test/completion/imports.py @@ -86,6 +86,9 @@ from keyword import kwlist, \ #? ['kwlist'] kwlist +#? [] +from keyword import not_existing1, not_existing2 + from tokenize import io tokenize.generate_tokens