From 31b335dc08ddac7055f5b26046550f75b611cb08 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 27 Dec 2012 13:31:55 +0100 Subject: [PATCH] fix for tar_import stuff, that was caused by http://bugs.python.org/issue16791, may affect davidhalter/jedi-vim#56 --- jedi/imports.py | 3 +-- test/completion/goto.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jedi/imports.py b/jedi/imports.py index 266fd879..678ba303 100644 --- a/jedi/imports.py +++ b/jedi/imports.py @@ -158,8 +158,7 @@ class ImportPath(parsing.Base): return [] scopes = [scope] - scopes += itertools.chain.from_iterable( - remove_star_imports(s) for s in scopes) + scopes += remove_star_imports(scope) # follow the rest of the import (not FS -> classes, functions) if len(rest) > 1 or rest and self.is_like_search: diff --git a/test/completion/goto.py b/test/completion/goto.py index a231eb00..101199ce 100644 --- a/test/completion/goto.py +++ b/test/completion/goto.py @@ -115,6 +115,9 @@ mod1.a #! ['a=1.0'] from import_tree.pkg.mod1 import a +#! ['import os'] +from .imports import os + # ----------------- # anonymous classes # -----------------