Refactoring: Make Import.get_all_import_names return NameParts.
This commit is contained in:
1 parent
83d2af5138
commit
b2342c76be
5 files changed
+13
-28
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user