

def _update_attributes(self, compare):
    self._api = compare.get('url', '')
    self.html_url = compare.get('html_url')
    self.permalink_url = compare.get('permalink_url')
    self.diff_url = compare.get('diff_url')
    self.patch_url = compare.get('patch_url')
    self.base_commit = RepoCommit(compare.get('base_commit'), None)
    self.status = compare.get('status')
    self.ahead_by = compare.get('ahead_by')
    self.behind_by = compare.get('behind_by')
    self.total_commits = compare.get('total_commits')
    self.commits = [RepoCommit(com) for com in compare.get('commits')]
    self.files = compare.get('files', [])
    self._uniq = self.commits

dataset/ETHPy150Open sigmavirus24/github3.py/github3/repos/comparison.py Comparison._update_attributes/original