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