mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 03:25:55 +08:00
fix problems with set_vars that were no set_vars
This commit is contained in:
@@ -807,6 +807,16 @@ class Statement(Simple):
|
|||||||
for stmt in call:
|
for stmt in call:
|
||||||
search_calls(stmt.get_commands())
|
search_calls(stmt.get_commands())
|
||||||
elif isinstance(call, Call):
|
elif isinstance(call, Call):
|
||||||
|
c = call
|
||||||
|
# Check if there's an execution in it, if so this is
|
||||||
|
# not a set_var.
|
||||||
|
is_execution = False
|
||||||
|
while c:
|
||||||
|
if Array.is_type(c.execution, Array.TUPLE):
|
||||||
|
is_execution = True
|
||||||
|
c = c.next
|
||||||
|
if is_execution:
|
||||||
|
continue
|
||||||
self._set_vars.append(call.name)
|
self._set_vars.append(call.name)
|
||||||
|
|
||||||
for calls, operation in self.assignment_details:
|
for calls, operation in self.assignment_details:
|
||||||
|
|||||||
@@ -127,10 +127,12 @@ class A():
|
|||||||
A().addition
|
A().addition
|
||||||
|
|
||||||
# should also work before `=`
|
# should also work before `=`
|
||||||
##? 8 int()
|
#? 8 int()
|
||||||
A().addition = None
|
A().addition = None
|
||||||
|
#? 8 int()
|
||||||
|
A(1).addition = None
|
||||||
a = A()
|
a = A()
|
||||||
##? 8 int()
|
#? 8 int()
|
||||||
a.addition = None
|
a.addition = None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user