1
0
forked from VimPlug/jedi

Fix some interpreter issues

This commit is contained in:
Dave Halter
2019-08-20 09:09:19 +02:00
parent 217b632213
commit 39b294e085
15 changed files with 83 additions and 50 deletions

View File

@@ -472,14 +472,18 @@ class Interpreter(Script):
self.namespaces = namespaces
self._inference_state.allow_descriptor_getattr = self._allow_descriptor_getattr_default
def _get_module(self):
return interpreter.MixedModuleValue(
self._inference_state,
self._module_node,
self.namespaces,
@cache.memoize_method
def _get_module_context(self):
tree_module_value = ModuleValue(
self._inference_state, self._module_node,
file_io=KnownContentFileIO(self.path, self._code),
string_names=('__main__',),
code_lines=self._code_lines,
)
return interpreter.MixedModuleContext(
tree_module_value,
self.namespaces,
)
def names(source=None, path=None, encoding='utf-8', all_scopes=False,