1
0
forked from VimPlug/jedi

Star imports are now part of the ModuleWrapper.

This commit is contained in:
Dave Halter
2014-11-19 18:09:49 +01:00
parent 08bdcfb8ca
commit ba0e61d99f
4 changed files with 38 additions and 5 deletions

View File

@@ -77,9 +77,9 @@ class ImportWrapper(pr.Base):
else:
scopes = [module]
star_imports = remove_star_imports(self._evaluator, module)
if star_imports:
scopes = [StarImportModule(scopes[0], star_imports)]
#star_imports = remove_star_imports(self._evaluator, module)
#if star_imports:
# scopes = [StarImportModule(scopes[0], star_imports)]
# goto only accepts `Name`
if is_goto and not rest:
@@ -616,6 +616,7 @@ def remove_star_imports(evaluator, scope, ignored_modules=()):
and follow these modules.
"""
raise NotImplementedError
if isinstance(scope, StarImportModule):
return scope.star_import_modules
modules = follow_imports(evaluator, (i for i in scope.get_imports() if i.star))