mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Remove the notion of ImmediateCompletion
This commit is contained in:
@@ -8,7 +8,7 @@ import GitCommit
|
||||
import GitTree
|
||||
|
||||
class GitCommit( object ):
|
||||
def __init__( self, requester, attributes, completion ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
self.__requester = requester
|
||||
self.__initAttributes()
|
||||
self.__useAttributes( attributes )
|
||||
@@ -53,17 +53,17 @@ class GitCommit( object ):
|
||||
def __useAttributes( self, attributes ):
|
||||
if "author" in attributes and attributes[ "author" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "author" ], dict ), attributes[ "author" ]
|
||||
self.__author = GitAuthor.GitAuthor( self.__requester, attributes[ "author" ], completion = LazyCompletion )
|
||||
self.__author = GitAuthor.GitAuthor( self.__requester, attributes[ "author" ], completed = False )
|
||||
if "committer" in attributes and attributes[ "committer" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "committer" ], dict ), attributes[ "committer" ]
|
||||
self.__committer = GitAuthor.GitAuthor( self.__requester, attributes[ "committer" ], completion = LazyCompletion )
|
||||
self.__committer = GitAuthor.GitAuthor( self.__requester, attributes[ "committer" ], completed = False )
|
||||
if "message" in attributes and attributes[ "message" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "message" ], ( str, unicode ) ), attributes[ "message" ]
|
||||
self.__message = attributes[ "message" ]
|
||||
if "parents" in attributes and attributes[ "parents" ] is not None: # pragma no branch
|
||||
assert all( isinstance( element, dict ) for element in attributes[ "parents" ] ), attributes[ "parents" ]
|
||||
self.__parents = [
|
||||
GitCommit( self.__requester, element, completion = LazyCompletion )
|
||||
GitCommit( self.__requester, element, completed = False )
|
||||
for element in attributes[ "parents" ]
|
||||
]
|
||||
if "sha" in attributes and attributes[ "sha" ] is not None: # pragma no branch
|
||||
@@ -71,7 +71,7 @@ class GitCommit( object ):
|
||||
self.__sha = attributes[ "sha" ]
|
||||
if "tree" in attributes and attributes[ "tree" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "tree" ], dict ), attributes[ "tree" ]
|
||||
self.__tree = GitTree.GitTree( self.__requester, attributes[ "tree" ], completion = LazyCompletion )
|
||||
self.__tree = GitTree.GitTree( self.__requester, attributes[ "tree" ], completed = False )
|
||||
if "url" in attributes and attributes[ "url" ] is not None: # pragma no branch
|
||||
assert isinstance( attributes[ "url" ], ( str, unicode ) ), attributes[ "url" ]
|
||||
self.__url = attributes[ "url" ]
|
||||
|
||||
Reference in New Issue
Block a user