diff --git a/codegen/templates/GithubObject.py b/codegen/templates/GithubObject.py index 10d98951..801e2408 100644 --- a/codegen/templates/GithubObject.py +++ b/codegen/templates/GithubObject.py @@ -66,7 +66,7 @@ class {{ class.name }}( object ): 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 [ {% for attribute in class.attributes|dictsort:"name" %}"{{ attribute.name }}", {% endfor %}] + assert attribute in [ {% for attribute in class.attributes|dictsort:"name" %}"{{ attribute.name }}", {% endfor %}], attribute # @todo No need to check if attribute is in attributes when attribute is mandatory {% for attribute in class.attributes|dictsort:"name" %} diff --git a/src/github/AuthenticatedUser.py b/src/github/AuthenticatedUser.py index ac12ae7b..ed7bdab9 100644 --- a/src/github/AuthenticatedUser.py +++ b/src/github/AuthenticatedUser.py @@ -568,7 +568,7 @@ class AuthenticatedUser( object ): 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", ] + 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: assert isinstance( attributes[ "avatar_url" ], ( str, unicode ) ) diff --git a/src/github/Authorization.py b/src/github/Authorization.py index 5642c931..227e8860 100644 --- a/src/github/Authorization.py +++ b/src/github/Authorization.py @@ -115,7 +115,7 @@ class Authorization( object ): 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", ] + 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: self.__app = attributes[ "app" ] diff --git a/src/github/Branch.py b/src/github/Branch.py index e82ce384..61912800 100644 --- a/src/github/Branch.py +++ b/src/github/Branch.py @@ -27,7 +27,7 @@ class Branch( object ): 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", ] + 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: assert isinstance( attributes[ "commit" ], dict ) diff --git a/src/github/Commit.py b/src/github/Commit.py index a67011b2..d810b91b 100644 --- a/src/github/Commit.py +++ b/src/github/Commit.py @@ -120,7 +120,7 @@ class Commit( object ): 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", ] + 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: assert isinstance( attributes[ "author" ], dict ) diff --git a/src/github/CommitComment.py b/src/github/CommitComment.py index a1dfed31..02d3ec28 100644 --- a/src/github/CommitComment.py +++ b/src/github/CommitComment.py @@ -119,7 +119,7 @@ class CommitComment( object ): 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", ] + 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: self.__body = attributes[ "body" ] diff --git a/src/github/CommitFile.py b/src/github/CommitFile.py index 9729897f..2500b085 100644 --- a/src/github/CommitFile.py +++ b/src/github/CommitFile.py @@ -61,7 +61,7 @@ class CommitFile( object ): 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", ] + 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: self.__additions = attributes[ "additions" ] diff --git a/src/github/CommitStats.py b/src/github/CommitStats.py index 46babcdb..d5c1575b 100644 --- a/src/github/CommitStats.py +++ b/src/github/CommitStats.py @@ -31,7 +31,7 @@ class CommitStats( object ): 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", ] + 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: assert isinstance( attributes[ "additions" ], int ) diff --git a/src/github/Download.py b/src/github/Download.py index eb4d2f3d..24393f54 100644 --- a/src/github/Download.py +++ b/src/github/Download.py @@ -160,7 +160,7 @@ class Download( object ): 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", ] + 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", ], 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: self.__accesskeyid = attributes[ "accesskeyid" ] diff --git a/src/github/Event.py b/src/github/Event.py index e6dcb5cc..d8b17e3e 100644 --- a/src/github/Event.py +++ b/src/github/Event.py @@ -107,7 +107,7 @@ class Event( object ): 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", "org", "payload", "public", "repo", "type", "url", ] + assert attribute in [ "actor", "commit_id", "created_at", "event", "id", "issue", "org", "payload", "public", "repo", "type", "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: assert isinstance( attributes[ "actor" ], dict ) diff --git a/src/github/Gist.py b/src/github/Gist.py index 322f2d2d..d9ffe379 100644 --- a/src/github/Gist.py +++ b/src/github/Gist.py @@ -211,7 +211,7 @@ class Gist( object ): 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", "forks", "git_pull_url", "git_push_url", "history", "html_url", "id", "public", "updated_at", "url", "user", ] + assert attribute in [ "comments", "created_at", "description", "files", "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: self.__comments = attributes[ "comments" ] diff --git a/src/github/GistComment.py b/src/github/GistComment.py index ae2418ad..3dcd27ec 100644 --- a/src/github/GistComment.py +++ b/src/github/GistComment.py @@ -89,7 +89,7 @@ class GistComment( object ): 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", ] + 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: self.__body = attributes[ "body" ] diff --git a/src/github/GitAuthor.py b/src/github/GitAuthor.py index 49c0b9e5..fd44a027 100644 --- a/src/github/GitAuthor.py +++ b/src/github/GitAuthor.py @@ -31,7 +31,7 @@ class GitAuthor( object ): 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", ] + 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: assert isinstance( attributes[ "date" ], ( str, unicode ) ) diff --git a/src/github/GitBlob.py b/src/github/GitBlob.py index 87c22b1a..0624d7ee 100644 --- a/src/github/GitBlob.py +++ b/src/github/GitBlob.py @@ -41,7 +41,7 @@ class GitBlob( object ): 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", ] + 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: assert isinstance( attributes[ "content" ], ( str, unicode ) ) diff --git a/src/github/GitCommit.py b/src/github/GitCommit.py index ff36c03c..cbb50227 100644 --- a/src/github/GitCommit.py +++ b/src/github/GitCommit.py @@ -54,7 +54,7 @@ class GitCommit( object ): 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", ] + 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: assert isinstance( attributes[ "author" ], dict ) diff --git a/src/github/GitObject.py b/src/github/GitObject.py index bb3f09b9..aa85ad17 100644 --- a/src/github/GitObject.py +++ b/src/github/GitObject.py @@ -31,7 +31,7 @@ class GitObject( object ): 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", ] + 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: assert isinstance( attributes[ "sha" ], ( str, unicode ) ) diff --git a/src/github/GitRef.py b/src/github/GitRef.py index 7673eab0..2e0facd3 100644 --- a/src/github/GitRef.py +++ b/src/github/GitRef.py @@ -54,7 +54,7 @@ class GitRef( object ): 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", ] + 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: assert isinstance( attributes[ "object" ], dict ) diff --git a/src/github/GitTag.py b/src/github/GitTag.py index 6d922a8a..4d0f81a5 100644 --- a/src/github/GitTag.py +++ b/src/github/GitTag.py @@ -48,7 +48,7 @@ class GitTag( object ): 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", ] + 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: assert isinstance( attributes[ "message" ], ( str, unicode ) ) diff --git a/src/github/GitTree.py b/src/github/GitTree.py index 1c3daa26..6dba0842 100644 --- a/src/github/GitTree.py +++ b/src/github/GitTree.py @@ -32,7 +32,7 @@ class GitTree( object ): 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", ] + 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: assert isinstance( attributes[ "sha" ], ( str, unicode ) ) diff --git a/src/github/GitTreeElement.py b/src/github/GitTreeElement.py index 17032cfa..47033408 100644 --- a/src/github/GitTreeElement.py +++ b/src/github/GitTreeElement.py @@ -46,7 +46,7 @@ class GitTreeElement( object ): 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", ] + 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: assert isinstance( attributes[ "mode" ], ( str, unicode ) ) diff --git a/src/github/Hook.py b/src/github/Hook.py index c6ce3091..c35aa250 100644 --- a/src/github/Hook.py +++ b/src/github/Hook.py @@ -123,7 +123,7 @@ class Hook( object ): 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", ] + 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: self.__active = attributes[ "active" ] diff --git a/src/github/Issue.py b/src/github/Issue.py index df79becf..f7fff924 100644 --- a/src/github/Issue.py +++ b/src/github/Issue.py @@ -248,7 +248,7 @@ class Issue( object ): 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", "state", "title", "updated_at", "url", "user", ] + assert attribute in [ "assignee", "body", "closed_at", "closed_by", "comments", "created_at", "html_url", "id", "labels", "milestone", "number", "pull_request", "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: assert isinstance( attributes[ "assignee" ], dict ) diff --git a/src/github/IssueComment.py b/src/github/IssueComment.py index f5bd7167..13284cd9 100644 --- a/src/github/IssueComment.py +++ b/src/github/IssueComment.py @@ -89,7 +89,7 @@ class IssueComment( object ): 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", ] + 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: self.__body = attributes[ "body" ] diff --git a/src/github/IssueEvent.py b/src/github/IssueEvent.py index 62e26477..feca8ab8 100644 --- a/src/github/IssueEvent.py +++ b/src/github/IssueEvent.py @@ -75,7 +75,7 @@ class IssueEvent( object ): 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", ] + 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: assert isinstance( attributes[ "actor" ], dict ) diff --git a/src/github/Label.py b/src/github/Label.py index 0a815ac7..701735dc 100644 --- a/src/github/Label.py +++ b/src/github/Label.py @@ -71,7 +71,7 @@ class Label( object ): 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", ] + 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: self.__color = attributes[ "color" ] diff --git a/src/github/Milestone.py b/src/github/Milestone.py index 80986cd3..2a1a2e28 100644 --- a/src/github/Milestone.py +++ b/src/github/Milestone.py @@ -140,7 +140,7 @@ class Milestone( object ): 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", ] + 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: assert isinstance( attributes[ "closed_issues" ], int ) diff --git a/src/github/NamedUser.py b/src/github/NamedUser.py index 6799c7f5..36678ec8 100644 --- a/src/github/NamedUser.py +++ b/src/github/NamedUser.py @@ -362,7 +362,7 @@ class NamedUser( object ): 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", ] + 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: self.__avatar_url = attributes[ "avatar_url" ] diff --git a/src/github/Organization.py b/src/github/Organization.py index 28c32abd..e66d3b48 100644 --- a/src/github/Organization.py +++ b/src/github/Organization.py @@ -379,7 +379,7 @@ class Organization( object ): 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", ] + 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: assert isinstance( attributes[ "avatar_url" ], ( str, unicode ) ) diff --git a/src/github/Permissions.py b/src/github/Permissions.py index 65642f06..84329f06 100644 --- a/src/github/Permissions.py +++ b/src/github/Permissions.py @@ -31,7 +31,7 @@ class Permissions( object ): 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", ] + 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: assert isinstance( attributes[ "admin" ], bool ) diff --git a/src/github/Plan.py b/src/github/Plan.py index e4ee5926..29bbc7de 100644 --- a/src/github/Plan.py +++ b/src/github/Plan.py @@ -36,7 +36,7 @@ class Plan( object ): 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", ] + 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: assert isinstance( attributes[ "collaborators" ], int ) diff --git a/src/github/PullRequest.py b/src/github/PullRequest.py index 79d93c71..375b57c6 100644 --- a/src/github/PullRequest.py +++ b/src/github/PullRequest.py @@ -277,7 +277,7 @@ class PullRequest( object ): 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", ] + 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", ], 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: self.__additions = attributes[ "additions" ] diff --git a/src/github/PullRequestComment.py b/src/github/PullRequestComment.py index 3d7ceeb5..0bff469c 100644 --- a/src/github/PullRequestComment.py +++ b/src/github/PullRequestComment.py @@ -119,7 +119,7 @@ class PullRequestComment( object ): 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", ] + 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: self.__body = attributes[ "body" ] diff --git a/src/github/PullRequestFile.py b/src/github/PullRequestFile.py index a75415a8..d47668bd 100644 --- a/src/github/PullRequestFile.py +++ b/src/github/PullRequestFile.py @@ -61,7 +61,7 @@ class PullRequestFile( object ): 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", ] + 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: self.__additions = attributes[ "additions" ] diff --git a/src/github/Repository.py b/src/github/Repository.py index edb40b72..ccf9bebf 100644 --- a/src/github/Repository.py +++ b/src/github/Repository.py @@ -895,7 +895,7 @@ class Repository( object ): 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", "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", ] + assert attribute in [ "clone_url", "created_at", "description", "fork", "forks", "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: assert isinstance( attributes[ "clone_url" ], ( str, unicode ) ) diff --git a/src/github/RepositoryKey.py b/src/github/RepositoryKey.py index 970570d3..767ae6e1 100644 --- a/src/github/RepositoryKey.py +++ b/src/github/RepositoryKey.py @@ -77,7 +77,7 @@ class RepositoryKey( object ): 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", ] + assert attribute in [ "id", "key", "title", "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: self.__id = attributes[ "id" ] diff --git a/src/github/Tag.py b/src/github/Tag.py index 0755fa6b..fb0c35ca 100644 --- a/src/github/Tag.py +++ b/src/github/Tag.py @@ -37,7 +37,7 @@ class Tag( object ): 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", ] + 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: assert isinstance( attributes[ "commit" ], dict ) diff --git a/src/github/Team.py b/src/github/Team.py index f270b535..ead82fb5 100644 --- a/src/github/Team.py +++ b/src/github/Team.py @@ -170,7 +170,7 @@ class Team( object ): 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", ] + 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: self.__id = attributes[ "id" ] diff --git a/src/github/UserKey.py b/src/github/UserKey.py index da1f1913..e3893949 100644 --- a/src/github/UserKey.py +++ b/src/github/UserKey.py @@ -79,7 +79,7 @@ class UserKey( object ): 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", ] + assert attribute in [ "id", "key", "title", "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: self.__id = attributes[ "id" ]