def get_import_names(self, node):
'''Return a list of the the full file names in the import statement.'''
result = []
for ast2 in node.names:
if self.kind(ast2) == 'alias':
data = ast2.name, ast2.asname
result.append(data)
else:
print('unsupported kind in Import.names list', self.kind(ast2))
return result
评论列表
文章目录