controller.py 文件源码

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

项目:qtk-python 作者: gouthambs 项目源码 文件源码
def _compile_node_creator_list(self):
        graph = self._graph
        cycles = list(nx.simple_cycles(graph))
        if len(cycles):
            raise ValueError("Found cycles in dependencies "+str(cycles))
        else:
            nodes = list(nx.dfs_postorder_nodes(graph))
            nodes.remove(self._ROOT)  # exclude root
            creators = []
            for n in nodes:
                creator = graph.node[n].get('creator')
                creators.append((n, creator))
            return creators
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号