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