1
0
forked from VimPlug/jedi

Prepare a test for #1479

This commit is contained in:
Dave Halter
2020-01-25 01:07:20 +01:00
parent 066b8b7165
commit 9c0efd5a67
6 changed files with 59 additions and 11 deletions

View File

@@ -24,15 +24,18 @@ class MixedModuleContext(ModuleContext):
super(MixedModuleContext, self).__init__(tree_module_value)
self._namespace_objects = [NamespaceObject(n) for n in namespaces]
def _get_mixed_object(self, compiled_object):
return mixed.MixedObject(
compiled_object=compiled_object,
tree_value=self._value
)
def get_filters(self, *args, **kwargs):
for filter in self._value.as_context().get_filters(*args, **kwargs):
yield filter
for namespace_obj in self._namespace_objects:
compiled_object = _create(self.inference_state, namespace_obj)
mixed_object = mixed.MixedObject(
compiled_object=compiled_object,
tree_value=self._value
)
mixed_object = self._get_mixed_object(compiled_object)
for filter in mixed_object.get_filters(*args, **kwargs):
yield filter