mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Fix completion and lazyness
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user