forked from VimPlug/jedi
fix function execution mutable list issue
This commit is contained in:
@@ -5,5 +5,5 @@ class partial():
|
||||
self.__keywords = keywords
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
# I know this doesn't work in Python, but Jedi can this ;-)
|
||||
# I know this doesn't work in Python, but in Jedi it does ;-)
|
||||
return self.__func(*self.__args, *args, **self.keywords, **kwargs)
|
||||
|
||||
@@ -444,7 +444,7 @@ class FunctionExecution(Executable):
|
||||
if func.is_generator and not evaluate_generator:
|
||||
return [iterable.Generator(self._evaluator, func, self.var_args)]
|
||||
else:
|
||||
stmts = docstrings.find_return_types(self._evaluator, func)
|
||||
stmts = list(docstrings.find_return_types(self._evaluator, func))
|
||||
for r in self.returns:
|
||||
if r is not None:
|
||||
stmts += self._evaluator.eval_statement(r)
|
||||
|
||||
Reference in New Issue
Block a user