mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Add many missing attributes
This commit is contained in:
@@ -48,6 +48,22 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._encoding)
|
||||
return self._NoneIfNotSet(self._encoding)
|
||||
|
||||
@property
|
||||
def git_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_url)
|
||||
return self._NoneIfNotSet(self._git_url)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@@ -99,6 +115,8 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
def _initAttributes(self):
|
||||
self._content = github.GithubObject.NotSet
|
||||
self._encoding = github.GithubObject.NotSet
|
||||
self._git_url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._path = github.GithubObject.NotSet
|
||||
self._sha = github.GithubObject.NotSet
|
||||
@@ -112,6 +130,12 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
if "encoding" in attributes: # pragma no branch
|
||||
assert attributes["encoding"] is None or isinstance(attributes["encoding"], (str, unicode)), attributes["encoding"]
|
||||
self._encoding = attributes["encoding"]
|
||||
if "git_url" in attributes: # pragma no branch
|
||||
assert attributes["git_url"] is None or isinstance(attributes["git_url"], (str, unicode)), attributes["git_url"]
|
||||
self._git_url = attributes["git_url"]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
|
||||
Reference in New Issue
Block a user