forked from VimPlug/jedi
if there's a func listener, stop the execution of a function. This solves the issue of nested *args that were reported as having too many params in static analysis.
This commit is contained in:
@@ -430,6 +430,12 @@ class FunctionExecution(Executable):
|
||||
# Feed the listeners, with the params.
|
||||
for listener in func.listeners:
|
||||
listener.execute(self._get_params())
|
||||
if func.listeners:
|
||||
# If we do have listeners, that means that there's not a regular
|
||||
# execution ongoing. In this case Jedi is interested in the
|
||||
# inserted params, not in the actual execution of the function.
|
||||
return []
|
||||
|
||||
if func.is_generator and not evaluate_generator:
|
||||
return [iterable.Generator(self._evaluator, func, self.var_args)]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user