diff --git a/jedi/parser/representation.py b/jedi/parser/representation.py index 9e6efbc3..5e3c140b 100644 --- a/jedi/parser/representation.py +++ b/jedi/parser/representation.py @@ -1380,7 +1380,7 @@ class StatementElement(Simple): def get_code(self): if self.next is not None: - s = '.' if isinstance(self, Array) else '' + s = '.' if not isinstance(self.next, Array) else '' return s + self.next.get_code() return ''