1
0
forked from VimPlug/jedi

Refactoring: Make Import.get_all_import_names return NameParts.

This commit is contained in:
Dave Halter
2014-09-19 01:40:05 +02:00
parent 83d2af5138
commit b2342c76be
5 changed files with 13 additions and 28 deletions

View File

@@ -831,20 +831,6 @@ class Import(Simple):
return [self.namespace]
def get_all_import_names(self):
n = []
if self.from_ns:
n.append(self.from_ns)
if self.namespace:
n.append(self.namespace)
if self.alias:
n.append(self.alias)
return n
def get_all_import_name_parts(self):
"""
TODO refactor and use this method, because NamePart will not exist in
the future.
"""
n = []
if self.from_ns:
n += self.from_ns.names