mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Update File.py
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user