forked from VimPlug/jedi
ExprStmt now doesn't contain imports anymore.
This commit is contained in:
@@ -1000,16 +1000,11 @@ class Statement(Simple, DocstringMixin):
|
|||||||
self.expression_list()
|
self.expression_list()
|
||||||
|
|
||||||
def get_defined_names(self):
|
def get_defined_names(self):
|
||||||
first = self.children[0] # children[1] is always a newline.
|
names = []
|
||||||
if isinstance(first, Import):
|
for i in range(0, len(self.children) - 2, 2):
|
||||||
return first.get_defined_names()
|
if self.children[i + 1].value == '=':
|
||||||
elif is_node(first, 'expr_stmt'):
|
names.append(self.children[i])
|
||||||
names = []
|
return 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 []
|
|
||||||
|
|
||||||
|
|
||||||
"""Get the names for the statement."""
|
"""Get the names for the statement."""
|
||||||
|
|||||||
Reference in New Issue
Block a user