expander.py 文件源码

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

项目:skymod 作者: DelusionalLogic 项目源码 文件源码
def packages_to_graph(self, targets):
        G = nx.DiGraph()
        for package in targets:
            G.add_node(package)
            for dep_name in package.dependecies:
                q = Query(dep_name)
                dep_package = self._find_satisfier_in_set(targets, q)
                if dep_package is None:
                    # Swallow the error, since this is expected in some cases
                    continue
                    # raise Exception(
                    #     "Tried to make a graph out of packages that "
                    #     "have unresolved dependencies: " + str(q)
                    # )
                G.add_edge(package, dep_package)
        return G
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号