Update Label.py

This commit is contained in:
AKFish
2013-08-21 16:21:22 +08:00
parent 7d40b9eae8
commit 175488270a
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -401,7 +401,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
if "labels" in attributes: # pragma no branch
assert attributes["labels"] is None or all(isinstance(element, dict) for element in attributes["labels"]), attributes["labels"]
self._labels = None if attributes["labels"] is None else [
github.Label.Label(self._requester, element, completed=False)
github.Label.Label(self._requester, self._headers, element, completed=False)
for element in attributes["labels"]
]
if "milestone" in attributes: # pragma no branch
-3
View File
@@ -33,9 +33,6 @@ class Label(github.GithubObject.CompletableGithubObject):
"""
This class represents Labels. The reference can be found here http://developer.github.com/v3/issues/labels/
"""
def __init__(self, requester, attributes, completed):
# Adapte for __init__ change, remove later
github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed)
@property
def color(self):
+2 -2
View File
@@ -599,7 +599,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
None,
post_parameters
)
return github.Label.Label(self._requester, data, completed=True)
return github.Label.Label(self._requester, headers, data, completed=True)
def create_milestone(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet):
"""
@@ -1266,7 +1266,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
None,
None
)
return github.Label.Label(self._requester, data, completed=True)
return github.Label.Label(self._requester, headers, data, completed=True)
def get_labels(self):
"""