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 # -----------------