mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Improve management of lazy completion
This commit is contained in:
@@ -6,12 +6,12 @@ from GithubObject import *
|
||||
import NamedUser
|
||||
|
||||
class PullRequestComment( object ):
|
||||
def __init__( self, requester, attributes, lazy ):
|
||||
def __init__( self, requester, attributes, completion ):
|
||||
self.__requester = requester
|
||||
self.__completed = False
|
||||
self.__completed = completion != LazyCompletion
|
||||
self.__initAttributes()
|
||||
self.__useAttributes( attributes )
|
||||
if not lazy:
|
||||
if completion == ImmediateCompletion:
|
||||
self.__complete()
|
||||
|
||||
@property
|
||||
@@ -143,4 +143,4 @@ class PullRequestComment( object ):
|
||||
self.__url = attributes[ "url" ]
|
||||
if "user" in attributes and attributes[ "user" ] is not None:
|
||||
assert isinstance( attributes[ "user" ], dict )
|
||||
self.__user = NamedUser.NamedUser( self.__requester, attributes[ "user" ], lazy = True )
|
||||
self.__user = NamedUser.NamedUser( self.__requester, attributes[ "user" ], completion = LazyCompletion )
|
||||
|
||||
Reference in New Issue
Block a user