mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Factorize the creation of attributes (preparation for #195)
This commit is contained in:
@@ -54,8 +54,6 @@ class AuthorizationApplication(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = github.GithubObject.ValuedAttribute(attributes["name"])
|
||||
self._name = self._makeStringAttribute(attributes["name"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = github.GithubObject.ValuedAttribute(attributes["url"])
|
||||
self._url = self._makeStringAttribute(attributes["url"])
|
||||
|
||||
Reference in New Issue
Block a user