def visit_ImportFrom(self, node: ast.ImportFrom) -> ast.ImportFrom:
const = self.__class__._constants
if node.module in const:
for alias in node.names:
if alias.name in const[node.module] and not alias.asname:
self._add_value(node.module, alias.name, alias.name)
return self.generic_visit(node)
评论列表
文章目录