1
0
forked from VimPlug/jedi

ExprStmt now doesn't contain imports anymore.

This commit is contained in:
Dave Halter
2014-10-17 14:56:12 +02:00
parent d7face17f6
commit 6abafc40fa

View File

@@ -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."""