forked from VimPlug/jedi
context -> value
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
TODO Some parts of this module are still not well documented.
|
||||
"""
|
||||
|
||||
from jedi.inference.context import ModuleContext
|
||||
from jedi.inference.value import ModuleContext
|
||||
from jedi.inference import compiled
|
||||
from jedi.inference.compiled import mixed
|
||||
from jedi.inference.compiled.access import create_access_path
|
||||
@@ -24,24 +24,24 @@ class MixedModuleContext(ContextWrapper):
|
||||
type = 'mixed_module'
|
||||
|
||||
def __init__(self, infer_state, tree_module, namespaces, file_io, code_lines):
|
||||
module_context = ModuleContext(
|
||||
module_value = ModuleContext(
|
||||
infer_state, tree_module,
|
||||
file_io=file_io,
|
||||
string_names=('__main__',),
|
||||
code_lines=code_lines
|
||||
)
|
||||
super(MixedModuleContext, self).__init__(module_context)
|
||||
super(MixedModuleContext, self).__init__(module_value)
|
||||
self._namespace_objects = [NamespaceObject(n) for n in namespaces]
|
||||
|
||||
def get_filters(self, *args, **kwargs):
|
||||
for filter in self._wrapped_context.get_filters(*args, **kwargs):
|
||||
for filter in self._wrapped_value.get_filters(*args, **kwargs):
|
||||
yield filter
|
||||
|
||||
for namespace_obj in self._namespace_objects:
|
||||
compiled_object = _create(self.infer_state, namespace_obj)
|
||||
mixed_object = mixed.MixedObject(
|
||||
compiled_object=compiled_object,
|
||||
tree_context=self._wrapped_context
|
||||
tree_value=self._wrapped_value
|
||||
)
|
||||
for filter in mixed_object.get_filters(*args, **kwargs):
|
||||
yield filter
|
||||
|
||||
Reference in New Issue
Block a user