step.py 文件源码

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

项目:civet 作者: TheJacksonLaboratory 项目源码 文件源码
def __init__(self, e, files):
        # Every step requires a name.
        if 'name' not in e.attrib or len(e.attrib) != 1:
            msg = ("Step must have (only) a name attribute. Tag had these "
                   "attributes: '{}'\n{}".format(", ".join(e.attrib.keys()), ET.tostring(e)))
            raise ParseError(msg)

        self.name = e.attrib['name'].replace(' ', '_')
        self.tools = []
        self.code = "S"
        for child in e:
            t = child.tag
            if t not in Step.validTags:
                msg = ("Illegal tag in step '{}': \n\n"
                       "{}\n\nValid Tags: '{}'".format(self.name,
                                                   ET.tostring(child).rstrip(),
                                                   ", ".join(Step.validTags)))
                raise ParseError(msg)
            self.tools.append(PipelineTool(child, files, e.attrib['name']))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号