From f3f7eacae3936bb5c21f313eba65ac8d0db99498 Mon Sep 17 00:00:00 2001 From: David Halter Date: Mon, 14 Jan 2013 22:35:32 +0100 Subject: [PATCH] fix a little problem with import keyword autocompletion --- jedi/api.py | 1 - test/completion/imports.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/jedi/api.py b/jedi/api.py index 3db88f98..dde42256 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -149,7 +149,6 @@ class Script(object): r'(,|from)\s*$|import\s+$', completion_line): completions += ((k, bs) for k in keywords.get_keywords('import')) - u = None if not path and not isinstance(u, parsing.Import): # add keywords diff --git a/test/completion/imports.py b/test/completion/imports.py index f7c423ad..af73b99c 100644 --- a/test/completion/imports.py +++ b/test/completion/imports.py @@ -196,7 +196,7 @@ import datetime. #? [] import datetime.date -#? 18 ['mod1', 'random', 'pkg', 'rename1', 'rename2'] +#? 18 ['mod1', 'random', 'pkg', 'rename1', 'rename2', 'import'] from import_tree. import pkg #? 18 ['pkg']