std.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:anarchy_sphinx 作者: AnarchyTools 项目源码 文件源码
def get_figtype(self, node):
        """Get figure type of nodes."""
        def has_child(node, cls):
            return any(isinstance(child, cls) for child in node)

        if isinstance(node, nodes.container):
            if node.get('literal_block') and has_child(node, nodes.literal_block):
                return 'code-block'
            else:
                return None
        else:
            figtype, _ = self.enumerable_nodes.get(node.__class__, (None, None))
            return figtype
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号