travis.py 文件源码

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

项目:flash_services 作者: textbook 项目源码 文件源码
def format_data(self, data):
        """Re-format the response data for the front-end.

        Arguments:
          data (:py:class:`dict`): The JSON data from the response.

        Returns:
          :py:class:`dict`: The re-formatted data.

        """
        commits = {commit['id']: commit for commit in data.get('commits', [])}
        builds = [
            self.format_build(build, commits.get(build.get('commit_id'), {}))
            for build in data.get('builds', [])
        ]
        estimate_time(builds)
        return dict(
            builds=builds[:4],
            health=health_summary(builds),
            name=self.repo,
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号