forked from VimPlug/jedi
Reenable star import caching.
This commit is contained in:
@@ -46,7 +46,6 @@ def completion_names(evaluator, imp, pos):
|
||||
if node.end_pos <= pos:
|
||||
if node in ('.', '...'):
|
||||
level += len(node.value)
|
||||
print(node, level)
|
||||
import_path = []
|
||||
else:
|
||||
# Completion on an existing name.
|
||||
@@ -127,7 +126,6 @@ class ImportWrapper(pr.Base):
|
||||
self._evaluator.find_types(s, rest[0], is_goto=True)
|
||||
for s in scopes))
|
||||
else:
|
||||
print(self._import, scopes, rest)
|
||||
if self._import.type == 'import_from' \
|
||||
or importer.str_import_path == ('os', 'path'):
|
||||
scopes = importer.follow_rest(scopes[0], rest)
|
||||
|
||||
@@ -36,7 +36,7 @@ from jedi._compatibility import use_metaclass, unicode, Python3Method
|
||||
from jedi.parser import tree as pr
|
||||
from jedi import debug
|
||||
from jedi import common
|
||||
from jedi.cache import underscore_memoization
|
||||
from jedi.cache import underscore_memoization, cache_star_import
|
||||
from jedi.evaluate.cache import memoize_default, CachedMetaClass, NO_DEFAULT
|
||||
from jedi.evaluate import compiled
|
||||
from jedi.evaluate import recursion
|
||||
@@ -754,6 +754,7 @@ class ModuleWrapper(use_metaclass(CachedMetaClass, pr.Module, Wrapper)):
|
||||
if sub_modules:
|
||||
yield self, self._sub_modules()
|
||||
|
||||
@cache_star_import
|
||||
@memoize_default([])
|
||||
def star_imports(self):
|
||||
modules = []
|
||||
|
||||
Reference in New Issue
Block a user