diff --git a/CodeGenerator/templates/GithubObject.py b/CodeGenerator/templates/GithubObject.py index bb1c98af..7750ab97 100644 --- a/CodeGenerator/templates/GithubObject.py +++ b/CodeGenerator/templates/GithubObject.py @@ -8,6 +8,8 @@ class {{ class.name }}( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() {% for attribute in class.attributes %} @property @@ -24,17 +26,17 @@ class {{ class.name }}( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True {% for method in class.methods|dictsort:"name" %} def {{ method.name|join:"_" }}( {% include "GithubObject.Parameters.py" with function=method only %} ): diff --git a/github/GithubObjects/AuthenticatedUser.py b/github/GithubObjects/AuthenticatedUser.py index 9d6d68b8..f8bb20a0 100644 --- a/github/GithubObjects/AuthenticatedUser.py +++ b/github/GithubObjects/AuthenticatedUser.py @@ -16,6 +16,8 @@ class AuthenticatedUser( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def avatar_url( self ): @@ -172,17 +174,17 @@ class AuthenticatedUser( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def add_to_emails( self, *emails ): pass diff --git a/github/GithubObjects/Authorization.py b/github/GithubObjects/Authorization.py index 43afa930..7f3a3bb8 100644 --- a/github/GithubObjects/Authorization.py +++ b/github/GithubObjects/Authorization.py @@ -8,6 +8,8 @@ class Authorization( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def app( self ): @@ -68,17 +70,17 @@ class Authorization( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Branch.py b/github/GithubObjects/Branch.py index 0079a5c6..367f9d6f 100644 --- a/github/GithubObjects/Branch.py +++ b/github/GithubObjects/Branch.py @@ -9,6 +9,8 @@ class Branch( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def commit( self ): @@ -27,17 +29,17 @@ class Branch( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "commit" in attributes: diff --git a/github/GithubObjects/Commit.py b/github/GithubObjects/Commit.py index 967b8bbd..987f2e2f 100644 --- a/github/GithubObjects/Commit.py +++ b/github/GithubObjects/Commit.py @@ -11,6 +11,8 @@ class Commit( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def author( self ): @@ -65,17 +67,17 @@ class Commit( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def create_comment( self, body, commit_id = None, line = None, path = None, position = None ): pass diff --git a/github/GithubObjects/CommitComment.py b/github/GithubObjects/CommitComment.py index 94e0b4d6..9abe433c 100644 --- a/github/GithubObjects/CommitComment.py +++ b/github/GithubObjects/CommitComment.py @@ -9,6 +9,8 @@ class CommitComment( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def body( self ): @@ -81,17 +83,17 @@ class CommitComment( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Download.py b/github/GithubObjects/Download.py index 2b6b47c8..4b503dfc 100644 --- a/github/GithubObjects/Download.py +++ b/github/GithubObjects/Download.py @@ -8,6 +8,8 @@ class Download( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def accesskeyid( self ): @@ -134,17 +136,17 @@ class Download( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Event.py b/github/GithubObjects/Event.py index 2648a54d..c2c3fe7d 100644 --- a/github/GithubObjects/Event.py +++ b/github/GithubObjects/Event.py @@ -11,6 +11,8 @@ class Event( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def actor( self ): @@ -89,17 +91,17 @@ class Event( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "actor" in attributes: diff --git a/github/GithubObjects/Gist.py b/github/GithubObjects/Gist.py index 9ce65140..f509b43e 100644 --- a/github/GithubObjects/Gist.py +++ b/github/GithubObjects/Gist.py @@ -11,6 +11,8 @@ class Gist( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def comments( self ): @@ -101,17 +103,17 @@ class Gist( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def create_comment( self, body ): pass diff --git a/github/GithubObjects/GistComment.py b/github/GithubObjects/GistComment.py index 9dd6544c..2d6dccc9 100644 --- a/github/GithubObjects/GistComment.py +++ b/github/GithubObjects/GistComment.py @@ -9,6 +9,8 @@ class GistComment( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def body( self ): @@ -51,17 +53,17 @@ class GistComment( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/GitBlob.py b/github/GithubObjects/GitBlob.py index cfc48db0..782abef4 100644 --- a/github/GithubObjects/GitBlob.py +++ b/github/GithubObjects/GitBlob.py @@ -8,6 +8,8 @@ class GitBlob( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def content( self ): @@ -44,17 +46,17 @@ class GitBlob( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "content" in attributes: diff --git a/github/GithubObjects/GitCommit.py b/github/GithubObjects/GitCommit.py index 7840d0ed..cd6769e2 100644 --- a/github/GithubObjects/GitCommit.py +++ b/github/GithubObjects/GitCommit.py @@ -9,6 +9,8 @@ class GitCommit( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def author( self ): @@ -57,17 +59,17 @@ class GitCommit( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "author" in attributes: diff --git a/github/GithubObjects/GitRef.py b/github/GithubObjects/GitRef.py index e31380fc..69810a0c 100644 --- a/github/GithubObjects/GitRef.py +++ b/github/GithubObjects/GitRef.py @@ -8,6 +8,8 @@ class GitRef( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def object( self ): @@ -32,17 +34,17 @@ class GitRef( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/GitTag.py b/github/GithubObjects/GitTag.py index 1e2a5a8c..ced9dadf 100644 --- a/github/GithubObjects/GitTag.py +++ b/github/GithubObjects/GitTag.py @@ -8,6 +8,8 @@ class GitTag( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def message( self ): @@ -50,17 +52,17 @@ class GitTag( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "message" in attributes: diff --git a/github/GithubObjects/GitTree.py b/github/GithubObjects/GitTree.py index 8a075c92..60c05182 100644 --- a/github/GithubObjects/GitTree.py +++ b/github/GithubObjects/GitTree.py @@ -8,6 +8,8 @@ class GitTree( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def recursive( self ): @@ -38,17 +40,17 @@ class GitTree( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "recursive" in attributes: diff --git a/github/GithubObjects/Hook.py b/github/GithubObjects/Hook.py index 3c0f2f73..64dd7bd0 100644 --- a/github/GithubObjects/Hook.py +++ b/github/GithubObjects/Hook.py @@ -8,6 +8,8 @@ class Hook( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def active( self ): @@ -68,17 +70,17 @@ class Hook( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Issue.py b/github/GithubObjects/Issue.py index df214219..17ee302d 100644 --- a/github/GithubObjects/Issue.py +++ b/github/GithubObjects/Issue.py @@ -13,6 +13,8 @@ class Issue( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def assignee( self ): @@ -121,17 +123,17 @@ class Issue( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def add_to_labels( self, *labels ): pass diff --git a/github/GithubObjects/IssueComment.py b/github/GithubObjects/IssueComment.py index 2f1ffa12..ba7b840f 100644 --- a/github/GithubObjects/IssueComment.py +++ b/github/GithubObjects/IssueComment.py @@ -9,6 +9,8 @@ class IssueComment( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def body( self ): @@ -51,17 +53,17 @@ class IssueComment( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/IssueEvent.py b/github/GithubObjects/IssueEvent.py index 1d7f385d..b13adc34 100644 --- a/github/GithubObjects/IssueEvent.py +++ b/github/GithubObjects/IssueEvent.py @@ -9,6 +9,8 @@ class IssueEvent( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def actor( self ): @@ -57,17 +59,17 @@ class IssueEvent( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "actor" in attributes: diff --git a/github/GithubObjects/Label.py b/github/GithubObjects/Label.py index e83e83e4..480f22ca 100644 --- a/github/GithubObjects/Label.py +++ b/github/GithubObjects/Label.py @@ -8,6 +8,8 @@ class Label( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def color( self ): @@ -32,17 +34,17 @@ class Label( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Milestone.py b/github/GithubObjects/Milestone.py index 4930b155..990b7cb7 100644 --- a/github/GithubObjects/Milestone.py +++ b/github/GithubObjects/Milestone.py @@ -10,6 +10,8 @@ class Milestone( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def closed_issues( self ): @@ -76,17 +78,17 @@ class Milestone( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/NamedUser.py b/github/GithubObjects/NamedUser.py index ecc63736..32c88147 100644 --- a/github/GithubObjects/NamedUser.py +++ b/github/GithubObjects/NamedUser.py @@ -13,6 +13,8 @@ class NamedUser( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def avatar_url( self ): @@ -175,17 +177,17 @@ class NamedUser( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def create_gist( self, public, files, description = None ): pass diff --git a/github/GithubObjects/Organization.py b/github/GithubObjects/Organization.py index 11a919a5..8b72376f 100644 --- a/github/GithubObjects/Organization.py +++ b/github/GithubObjects/Organization.py @@ -12,6 +12,8 @@ class Organization( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def avatar_url( self ): @@ -162,17 +164,17 @@ class Organization( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def add_to_public_members( self, public_member ): pass diff --git a/github/GithubObjects/PullRequest.py b/github/GithubObjects/PullRequest.py index 427f8fde..a05ac0e9 100644 --- a/github/GithubObjects/PullRequest.py +++ b/github/GithubObjects/PullRequest.py @@ -12,6 +12,8 @@ class PullRequest( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def additions( self ): @@ -174,17 +176,17 @@ class PullRequest( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def edit( self, title = None, body = None, state = None ): post_parameters = { diff --git a/github/GithubObjects/PullRequestComment.py b/github/GithubObjects/PullRequestComment.py index e52a475b..dee95122 100644 --- a/github/GithubObjects/PullRequestComment.py +++ b/github/GithubObjects/PullRequestComment.py @@ -9,6 +9,8 @@ class PullRequestComment( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def body( self ): @@ -81,17 +83,17 @@ class PullRequestComment( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/PullRequestFile.py b/github/GithubObjects/PullRequestFile.py index 657d63fa..1f279df0 100644 --- a/github/GithubObjects/PullRequestFile.py +++ b/github/GithubObjects/PullRequestFile.py @@ -8,6 +8,8 @@ class PullRequestFile( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def additions( self ): @@ -68,17 +70,17 @@ class PullRequestFile( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "additions" in attributes: diff --git a/github/GithubObjects/Repository.py b/github/GithubObjects/Repository.py index f8fd4b68..d2e6d8e1 100644 --- a/github/GithubObjects/Repository.py +++ b/github/GithubObjects/Repository.py @@ -29,6 +29,8 @@ class Repository( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def clone_url( self ): @@ -215,17 +217,17 @@ class Repository( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def add_to_collaborators( self, collaborator ): pass diff --git a/github/GithubObjects/RepositoryKey.py b/github/GithubObjects/RepositoryKey.py index b1b6a8dc..a9b0ddcd 100644 --- a/github/GithubObjects/RepositoryKey.py +++ b/github/GithubObjects/RepositoryKey.py @@ -8,6 +8,8 @@ class RepositoryKey( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def id( self ): @@ -38,17 +40,17 @@ class RepositoryKey( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass diff --git a/github/GithubObjects/Tag.py b/github/GithubObjects/Tag.py index 73f2ec5e..e1bf9017 100644 --- a/github/GithubObjects/Tag.py +++ b/github/GithubObjects/Tag.py @@ -9,6 +9,8 @@ class Tag( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def commit( self ): @@ -39,17 +41,17 @@ class Tag( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def __useAttributes( self, attributes ): if "commit" in attributes: diff --git a/github/GithubObjects/Team.py b/github/GithubObjects/Team.py index be46c48f..00842601 100644 --- a/github/GithubObjects/Team.py +++ b/github/GithubObjects/Team.py @@ -10,6 +10,8 @@ class Team( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def id( self ): @@ -52,17 +54,17 @@ class Team( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def add_to_members( self, member ): pass diff --git a/github/GithubObjects/UserKey.py b/github/GithubObjects/UserKey.py index 52b73094..77dfe80e 100644 --- a/github/GithubObjects/UserKey.py +++ b/github/GithubObjects/UserKey.py @@ -8,6 +8,8 @@ class UserKey( object ): self.__completed = False self.__initAttributes() self.__useAttributes( attributes ) + if not lazy: + self.__complete() @property def id( self ): @@ -38,17 +40,17 @@ class UserKey( object ): def __completeIfNeeded( self, testedAttribute ): if not self.__completed and testedAttribute is None: self.__complete() - self.__completed = True # @todo Do not generate __complete if type has no url attribute def __complete( self ): result = self.__github._dataRequest( "GET", - self.url, + self.__url, None, None ) self.__useAttributes( result ) + self.__completed = True def delete( self ): pass