mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-24 17:28:36 +08:00
Fix an issue with CallSignatures:
If used in a longer statement, it could happen that parts of the statement was still evaluated, but the call signature is only valid at the cursor.
This commit is contained in:
@@ -564,9 +564,10 @@ class Script(object):
|
|||||||
# Go to parent literal/variable until not possible anymore. This
|
# Go to parent literal/variable until not possible anymore. This
|
||||||
# makes it possible to return the whole expression.
|
# makes it possible to return the whole expression.
|
||||||
stmt_el = stmt_el.parent
|
stmt_el = stmt_el.parent
|
||||||
# We can reset the execution since it's a new object
|
# We can change the execution since it's a new object
|
||||||
# (fast_parent_copy).
|
# (fast_parent_copy).
|
||||||
execution_arr, call.execution = call.execution, None
|
execution_arr, call.execution = call.execution, None
|
||||||
|
call.next = None
|
||||||
|
|
||||||
with common.scale_speed_settings(settings.scale_call_signatures):
|
with common.scale_speed_settings(settings.scale_call_signatures):
|
||||||
_callable = lambda: self._evaluator.eval_call(stmt_el)
|
_callable = lambda: self._evaluator.eval_call(stmt_el)
|
||||||
|
|||||||
Reference in New Issue
Block a user