mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Do not assert that we know all the attributes we receive
This commit is contained in:
@@ -564,9 +564,6 @@ class AuthenticatedUser( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "avatar_url", "bio", "blog", "collaborators", "company", "created_at", "disk_usage", "email", "followers", "following", "gravatar_id", "hireable", "html_url", "id", "location", "login", "name", "owned_private_repos", "plan", "private_gists", "public_gists", "public_repos", "total_private_repos", "type", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "avatar_url" in attributes and attributes[ "avatar_url" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "avatar_url" ], ( str, unicode ) )
|
||||
|
||||
@@ -113,9 +113,6 @@ class Authorization( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "app", "created_at", "id", "note", "note_url", "scopes", "token", "updated_at", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "app" in attributes and attributes[ "app" ] is not None: # pragma no branch
|
||||
self.__app = attributes[ "app" ]
|
||||
|
||||
@@ -24,9 +24,6 @@ class Branch( object ):
|
||||
self.__name = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "commit", "name", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "commit" in attributes and attributes[ "commit" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "commit" ], dict )
|
||||
|
||||
@@ -116,9 +116,6 @@ class Commit( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "author", "commit", "committer", "files", "parents", "sha", "stats", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "author" in attributes and attributes[ "author" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "author" ], dict )
|
||||
|
||||
@@ -117,9 +117,6 @@ class CommitComment( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "body", "commit_id", "created_at", "html_url", "id", "line", "path", "position", "updated_at", "url", "user", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "body" in attributes and attributes[ "body" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "body" ], ( str, unicode ) )
|
||||
|
||||
@@ -58,9 +58,6 @@ class CommitFile( object ):
|
||||
self.__status = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "additions", "blob_url", "changes", "deletions", "filename", "patch", "raw_url", "sha", "status", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "additions" in attributes and attributes[ "additions" ] is not None: # pragma no branch
|
||||
self.__additions = attributes[ "additions" ]
|
||||
|
||||
@@ -28,9 +28,6 @@ class CommitStats( object ):
|
||||
self.__total = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "additions", "deletions", "total", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "additions" in attributes and attributes[ "additions" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "additions" ], int )
|
||||
|
||||
@@ -158,9 +158,6 @@ class Download( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "accesskeyid", "acl", "bucket", "content_type", "created_at", "description", "download_count", "expirationdate", "html_url", "id", "mime_type", "name", "path", "policy", "prefix", "redirect", "s3_url", "signature", "size", "url", "x-amz-meta-content-disposition" ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "accesskeyid" in attributes and attributes[ "accesskeyid" ] is not None: # pragma no branch
|
||||
self.__accesskeyid = attributes[ "accesskeyid" ]
|
||||
|
||||
@@ -56,9 +56,6 @@ class Event( object ):
|
||||
self.__type = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "actor", "created_at", "id", "org", "payload", "public", "repo", "type", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "actor" in attributes and attributes[ "actor" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "actor" ], dict )
|
||||
|
||||
@@ -216,9 +216,6 @@ class Gist( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "comments", "created_at", "description", "files", "fork_of", "forks", "git_pull_url", "git_push_url", "history", "html_url", "id", "public", "updated_at", "url", "user", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "comments" in attributes and attributes[ "comments" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "comments" ], int )
|
||||
|
||||
@@ -64,9 +64,6 @@ class GistComment( object ):
|
||||
self.__user = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "body", "created_at", "id", "updated_at", "url", "user", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "body" in attributes and attributes[ "body" ] is not None: # pragma no branch
|
||||
self.__body = attributes[ "body" ]
|
||||
|
||||
@@ -40,9 +40,6 @@ class GistHistoryState( object ):
|
||||
self.__version = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "change_status", "committed_at", "url", "user", "version", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "change_status" in attributes and attributes[ "change_status" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "change_status" ], dict )
|
||||
|
||||
@@ -28,9 +28,6 @@ class GitAuthor( object ):
|
||||
self.__name = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "date", "email", "name", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "date" in attributes and attributes[ "date" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "date" ], ( str, unicode ) )
|
||||
|
||||
@@ -38,9 +38,6 @@ class GitBlob( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "content", "encoding", "sha", "size", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "content" in attributes and attributes[ "content" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "content" ], ( str, unicode ) )
|
||||
|
||||
@@ -51,9 +51,6 @@ class GitCommit( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "author", "committer", "message", "parents", "sha", "tree", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "author" in attributes and attributes[ "author" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "author" ], dict )
|
||||
|
||||
@@ -28,9 +28,6 @@ class GitObject( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "sha", "type", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "sha" in attributes and attributes[ "sha" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "sha" ], ( str, unicode ) )
|
||||
|
||||
@@ -51,9 +51,6 @@ class GitRef( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "object", "ref", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "object" in attributes and attributes[ "object" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "object" ], dict )
|
||||
|
||||
@@ -45,9 +45,6 @@ class GitTag( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "message", "object", "sha", "tag", "tagger", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "message" in attributes and attributes[ "message" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "message" ], ( str, unicode ) )
|
||||
|
||||
@@ -29,9 +29,6 @@ class GitTree( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "sha", "tree", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "sha" in attributes and attributes[ "sha" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "sha" ], ( str, unicode ) )
|
||||
|
||||
@@ -43,9 +43,6 @@ class GitTreeElement( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "mode", "path", "sha", "size", "type", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "mode" in attributes and attributes[ "mode" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "mode" ], ( str, unicode ) )
|
||||
|
||||
@@ -95,9 +95,6 @@ class Hook( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "active", "config", "created_at", "events", "id", "last_response", "name", "updated_at", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "active" in attributes and attributes[ "active" ] is not None: # pragma no branch
|
||||
self.__active = attributes[ "active" ]
|
||||
|
||||
@@ -264,9 +264,6 @@ class Issue( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "assignee", "body", "closed_at", "closed_by", "comments", "created_at", "html_url", "id", "labels", "milestone", "number", "pull_request", "repository", "state", "title", "updated_at", "url", "user", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "assignee" in attributes and attributes[ "assignee" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "assignee" ], dict )
|
||||
|
||||
@@ -64,9 +64,6 @@ class IssueComment( object ):
|
||||
self.__user = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "body", "created_at", "id", "updated_at", "url", "user", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "body" in attributes and attributes[ "body" ] is not None: # pragma no branch
|
||||
self.__body = attributes[ "body" ]
|
||||
|
||||
@@ -74,9 +74,6 @@ class IssueEvent( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "actor", "commit_id", "created_at", "event", "id", "issue", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "actor" in attributes and attributes[ "actor" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "actor" ], dict )
|
||||
|
||||
@@ -56,9 +56,6 @@ class Label( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "color", "name", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "color" in attributes and attributes[ "color" ] is not None: # pragma no branch
|
||||
self.__color = attributes[ "color" ]
|
||||
|
||||
@@ -110,9 +110,6 @@ class Milestone( object ):
|
||||
self.__url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "closed_issues", "created_at", "creator", "description", "due_on", "id", "number", "open_issues", "state", "title", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "closed_issues" in attributes and attributes[ "closed_issues" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "closed_issues" ], int )
|
||||
|
||||
@@ -361,9 +361,6 @@ class NamedUser( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "avatar_url", "bio", "blog", "collaborators", "company", "contributions", "created_at", "disk_usage", "email", "followers", "following", "gravatar_id", "hireable", "html_url", "id", "location", "login", "name", "owned_private_repos", "plan", "private_gists", "public_gists", "public_repos", "total_private_repos", "type", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "avatar_url" in attributes and attributes[ "avatar_url" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "avatar_url" ], ( str, unicode ) )
|
||||
|
||||
@@ -386,9 +386,6 @@ class Organization( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "avatar_url", "billing_email", "blog", "collaborators", "company", "created_at", "disk_usage", "email", "followers", "following", "gravatar_id", "html_url", "id", "location", "login", "name", "owned_private_repos", "plan", "private_gists", "public_gists", "public_repos", "total_private_repos", "type", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "avatar_url" in attributes and attributes[ "avatar_url" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "avatar_url" ], ( str, unicode ) )
|
||||
|
||||
@@ -28,9 +28,6 @@ class Permissions( object ):
|
||||
self.__push = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "admin", "pull", "push", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "admin" in attributes and attributes[ "admin" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "admin" ], bool )
|
||||
|
||||
@@ -33,9 +33,6 @@ class Plan( object ):
|
||||
self.__space = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "collaborators", "name", "private_repos", "space", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "collaborators" in attributes and attributes[ "collaborators" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "collaborators" ], int )
|
||||
|
||||
@@ -290,9 +290,6 @@ class PullRequest( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "additions", "base", "body", "changed_files", "closed_at", "comments", "commits", "created_at", "deletions", "diff_url", "head", "html_url", "id", "issue_url", "mergeable", "merged", "merged_at", "merged_by", "number", "patch_url", "review_comments", "state", "title", "updated_at", "url", "user", "_links", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "additions" in attributes and attributes[ "additions" ] is not None: # pragma no branch
|
||||
self.__additions = attributes[ "additions" ]
|
||||
|
||||
@@ -117,9 +117,6 @@ class PullRequestComment( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "body", "commit_id", "created_at", "id", "original_commit_id", "original_position", "path", "position", "updated_at", "url", "user", "_links", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "body" in attributes and attributes[ "body" ] is not None: # pragma no branch
|
||||
self.__body = attributes[ "body" ]
|
||||
|
||||
@@ -58,9 +58,6 @@ class PullRequestFile( object ):
|
||||
self.__status = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "additions", "blob_url", "changes", "deletions", "filename", "patch", "raw_url", "sha", "status", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "additions" in attributes and attributes[ "additions" ] is not None: # pragma no branch
|
||||
self.__additions = attributes[ "additions" ]
|
||||
|
||||
@@ -917,9 +917,6 @@ class Repository( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "clone_url", "created_at", "description", "fork", "forks", "full_name", "git_url", "has_downloads", "has_issues", "has_wiki", "homepage", "html_url", "id", "language", "master_branch", "mirror_url", "name", "open_issues", "organization", "owner", "parent", "permissions", "private", "pushed_at", "size", "source", "ssh_url", "svn_url", "updated_at", "url", "watchers", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "clone_url" in attributes and attributes[ "clone_url" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "clone_url" ], ( str, unicode ) )
|
||||
|
||||
@@ -83,9 +83,6 @@ class RepositoryKey( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "id", "key", "title", "url", "verified", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "id" in attributes and attributes[ "id" ] is not None: # pragma no branch
|
||||
self.__id = attributes[ "id" ]
|
||||
|
||||
@@ -34,9 +34,6 @@ class Tag( object ):
|
||||
self.__zipball_url = None
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "commit", "name", "tarball_url", "zipball_url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "commit" in attributes and attributes[ "commit" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "commit" ], dict )
|
||||
|
||||
@@ -168,9 +168,6 @@ class Team( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "id", "members_count", "name", "permission", "repos_count", "url", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "id" in attributes and attributes[ "id" ] is not None: # pragma no branch
|
||||
self.__id = attributes[ "id" ]
|
||||
|
||||
@@ -83,9 +83,6 @@ class UserKey( object ):
|
||||
self.__completed = True
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
# @todo Remove this debug weakness: we shall assume that github will add new attributes
|
||||
for attribute in attributes:
|
||||
assert attribute in [ "id", "key", "title", "url", "verified", ], attribute
|
||||
# @todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "id" in attributes and attributes[ "id" ] is not None: # pragma no branch
|
||||
self.__id = attributes[ "id" ]
|
||||
|
||||
Reference in New Issue
Block a user