1
0
forked from VimPlug/jedi

Create a way of accessing access objects through a subprocess

This commit is contained in:
Dave Halter
2017-12-06 14:18:10 +01:00
parent 34bd19ee8d
commit 7db6d11c49
4 changed files with 48 additions and 67 deletions

View File

@@ -114,9 +114,8 @@ def compiled_objects_cache(attribute_name):
return decorator
@compiled_objects_cache('compiled_cache')
def create_access(evaluator, obj):
return DirectObjectAccess(evaluator, obj)
return evaluator.compiled_subprocess.get_or_create_access_handle(obj)
def load_module(evaluator, path=None, name=None):
@@ -329,9 +328,10 @@ class DirectObjectAccess(object):
return list(reversed(list(get())))
def execute_operation(self, other, operator):
def execute_operation(self, other_access_handle, operator):
other_access = other_access_handle.access
op = _OPERATORS[operator]
return self._create_access_path(op(self._obj, other._obj))
return self._create_access_path(op(self._obj, other_access._obj))
def needs_type_completions(self):
return inspect.isclass(self._obj) and self._obj != type