mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-01 07:26:51 +08:00
remove a very old function call in FunctionExecution that had no effect
This commit is contained in:
@@ -452,20 +452,21 @@ class FunctionExecution(Executed):
|
|||||||
@recursion.execution_recursion_decorator
|
@recursion.execution_recursion_decorator
|
||||||
def get_return_types(self):
|
def get_return_types(self):
|
||||||
func = self.base
|
func = self.base
|
||||||
# Feed the listeners, with the params.
|
|
||||||
for listener in func.listeners:
|
|
||||||
listener.execute(self._get_params())
|
|
||||||
if func.listeners:
|
if func.listeners:
|
||||||
|
# Feed the listeners, with the params.
|
||||||
|
for listener in func.listeners:
|
||||||
|
listener.execute(self._get_params())
|
||||||
# If we do have listeners, that means that there's not a regular
|
# If we do have listeners, that means that there's not a regular
|
||||||
# execution ongoing. In this case Jedi is interested in the
|
# execution ongoing. In this case Jedi is interested in the
|
||||||
# inserted params, not in the actual execution of the function.
|
# inserted params, not in the actual execution of the function.
|
||||||
return []
|
return []
|
||||||
|
|
||||||
stmts = list(docstrings.find_return_types(self._evaluator, func))
|
types = list(docstrings.find_return_types(self._evaluator, func))
|
||||||
for r in self.returns:
|
for r in self.returns:
|
||||||
if r is not None:
|
if r is not None:
|
||||||
stmts += self._evaluator.eval_statement(r)
|
types += self._evaluator.eval_statement(r)
|
||||||
return imports.follow_imports(self._evaluator, stmts)
|
return types
|
||||||
|
|
||||||
@memoize_default(default=())
|
@memoize_default(default=())
|
||||||
def _get_params(self):
|
def _get_params(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user