forked from VimPlug/jedi
FunctionExecutionContext should use the parent if possible
This commit is contained in:
@@ -323,13 +323,17 @@ class BoundMethod(AbstractFunction):
|
|||||||
if arguments is None:
|
if arguments is None:
|
||||||
arguments = AnonymousInstanceArguments(self._instance)
|
arguments = AnonymousInstanceArguments(self._instance)
|
||||||
|
|
||||||
|
arguments = InstanceArguments(self._instance, arguments)
|
||||||
|
|
||||||
|
if isinstance(self._function, compiled.CompiledObject):
|
||||||
|
# This is kind of weird, because it's coming from a compiled object
|
||||||
|
# and we're not sure if we want that in the future.
|
||||||
return FunctionExecutionContext(
|
return FunctionExecutionContext(
|
||||||
self.evaluator,
|
self.evaluator, self.parent_context, self, arguments
|
||||||
self.parent_context,
|
|
||||||
self,
|
|
||||||
InstanceArguments(self._instance, arguments)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return self._function.get_function_execution(arguments)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s: %s>' % (self.__class__.__name__, self._function)
|
return '<%s: %s>' % (self.__class__.__name__, self._function)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user