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
@@ -80,10 +80,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
self.url,
None,
None,
None
self.url
)
def edit(self, title=github.GithubObject.NotSet, key=github.GithubObject.NotSet):
@@ -103,9 +100,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
headers, data = self._requester.requestJsonAndCheck(
"PATCH",
self.url,
None,
None,
post_parameters
input=post_parameters
)
self._useAttributes(data)