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