From bb56857b4d5e9d85f26815a3da4c69f6bc718fbd Mon Sep 17 00:00:00 2001 From: AKFish Date: Wed, 21 Aug 2013 13:15:25 +0800 Subject: [PATCH] Update File.py --- github/Commit.py | 2 +- github/Comparison.py | 2 +- github/File.py | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/github/Commit.py b/github/Commit.py index 1b9c6955..132fff20 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -211,7 +211,7 @@ class Commit(github.GithubObject.CompletableGithubObject): if "files" in attributes: # pragma no branch assert attributes["files"] is None or all(isinstance(element, dict) for element in attributes["files"]), attributes["files"] self._files = None if attributes["files"] is None else [ - github.File.File(self._requester, element, completed=False) + github.File.File(self._requester, self._headers, element, completed=False) for element in attributes["files"] ] if "parents" in attributes: # pragma no branch diff --git a/github/Comparison.py b/github/Comparison.py index a67cb5ae..eb9eadd8 100644 --- a/github/Comparison.py +++ b/github/Comparison.py @@ -166,7 +166,7 @@ class Comparison(github.GithubObject.CompletableGithubObject): if "files" in attributes: # pragma no branch assert attributes["files"] is None or all(isinstance(element, dict) for element in attributes["files"]), attributes["files"] self._files = None if attributes["files"] is None else [ - github.File.File(self._requester, element, completed=False) + github.File.File(self._requester, self._headers, element, completed=False) for element in attributes["files"] ] if "html_url" in attributes: # pragma no branch diff --git a/github/File.py b/github/File.py index e126bac0..538fde6b 100644 --- a/github/File.py +++ b/github/File.py @@ -30,11 +30,6 @@ class File(github.GithubObject.NonCompletableGithubObject): """ This class represents Files as returned for example by http://developer.github.com/v3/todo """ - def __init__(self, requester, attributes, completed): - ''' - Adapte for __init__ change, remove later - ''' - github.GithubObject.NonCompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def additions(self):