From 175488270a65a97a42c7bc3fd0bf42676ea4a6e3 Mon Sep 17 00:00:00 2001 From: AKFish Date: Wed, 21 Aug 2013 16:21:22 +0800 Subject: [PATCH] Update Label.py --- github/Issue.py | 2 +- github/Label.py | 3 --- github/Repository.py | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/github/Issue.py b/github/Issue.py index 0c2dfc21..6a863638 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -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 diff --git a/github/Label.py b/github/Label.py index e09082ff..e2d42335 100644 --- a/github/Label.py +++ b/github/Label.py @@ -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): diff --git a/github/Repository.py b/github/Repository.py index 49530a69..12de729f 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -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): """