diff --git a/jedi/parser/representation.py b/jedi/parser/representation.py index f1cd4da3..e82773ca 100644 --- a/jedi/parser/representation.py +++ b/jedi/parser/representation.py @@ -807,6 +807,16 @@ class Statement(Simple): for stmt in call: search_calls(stmt.get_commands()) 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) for calls, operation in self.assignment_details: diff --git a/test/completion/classes.py b/test/completion/classes.py index a0bbaba4..4a546539 100644 --- a/test/completion/classes.py +++ b/test/completion/classes.py @@ -127,10 +127,12 @@ class A(): A().addition # should also work before `=` -##? 8 int() +#? 8 int() A().addition = None +#? 8 int() +A(1).addition = None a = A() -##? 8 int() +#? 8 int() a.addition = None