artifact.py 文件源码

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

项目:calmjs 作者: calmjs 项目源码 文件源码
def trace_toolchain(toolchain):
    """
    Trace the versions of the involved packages for the provided
    toolchain instance.
    """

    pkgs = []
    for cls in getmro(type(toolchain)):
        if not issubclass(cls, Toolchain):
            continue
        dist = _cls_lookup_dist(cls)
        value = {
            'project_name': dist.project_name,
            'version': dist.version,
        } if dist else {}
        key = '%s:%s' % (cls.__module__, cls.__name__)
        pkgs.append({key: value})
    return pkgs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号