Add default parameters to greatly reduce code redoundancy

This commit is contained in:
Vincent Jacques
2013-09-06 11:01:32 +02:00
parent 2081675afb
commit f2feb81dae
26 changed files with 160 additions and 566 deletions
+2 -7
View File
@@ -113,10 +113,7 @@ class Authorization(github.GithubObject.CompletableGithubObject):
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
self.url,
None,
None,
None
self.url
)
def edit(self, scopes=github.GithubObject.NotSet, add_scopes=github.GithubObject.NotSet, remove_scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet):
@@ -148,9 +145,7 @@ class Authorization(github.GithubObject.CompletableGithubObject):
headers, data = self._requester.requestJsonAndCheck(
"PATCH",
self.url,
None,
None,
post_parameters
input=post_parameters
)
self._useAttributes(data)