From 6abafc40faa0a708dc80a5bb46b8e3ddd276e416 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 17 Oct 2014 14:56:12 +0200 Subject: [PATCH] ExprStmt now doesn't contain imports anymore. --- jedi/parser/representation.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/jedi/parser/representation.py b/jedi/parser/representation.py index 4cf2021e..352ed2f0 100644 --- a/jedi/parser/representation.py +++ b/jedi/parser/representation.py @@ -1000,16 +1000,11 @@ class Statement(Simple, DocstringMixin): self.expression_list() def get_defined_names(self): - first = self.children[0] # children[1] is always a newline. - if isinstance(first, Import): - return first.get_defined_names() - elif is_node(first, 'expr_stmt'): - names = [] - for i in range(0, len(first.children) - 2, 2): - if first.children[i + 1].value == '=': - names.append(first.children[i]) - return names - return [] + names = [] + for i in range(0, len(self.children) - 2, 2): + if self.children[i + 1].value == '=': + names.append(self.children[i]) + return names """Get the names for the statement."""