1
0
forked from VimPlug/jedi

Add a module cache that has a bit more capabilites

This commit is contained in:
Dave Halter
2018-02-10 21:21:25 +01:00
parent 92c76537d6
commit 26774c79fb
3 changed files with 23 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ class ModuleContext(use_metaclass(CachedMetaClass, TreeContext)):
# I'm not sure if the star import cache is really that effective anymore
# with all the other really fast import caches. Recheck. Also we would need
# to push the star imports into Evaluator.modules, if we reenable this.
# to push the star imports into Evaluator.module_cache, if we reenable this.
@evaluator_method_cache([])
def star_imports(self):
modules = []
@@ -115,7 +115,7 @@ class ModuleContext(use_metaclass(CachedMetaClass, TreeContext)):
return None
def py__name__(self):
for name, module in self.evaluator.modules.items():
for name, module in self.evaluator.module_cache.iterate_modules_with_names():
if module == self and name != '':
return name