mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Remove the notion of ImmediateCompletion
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
{% if attribute.type.simple %}
|
||||
self.__{{ attribute.name }} = attributes[ "{{ attribute.name }}" ]
|
||||
{% else %}
|
||||
self.__{{ attribute.name }} = {% if attribute.type.name != class.name %}{{ attribute.type.name }}.{% endif %}{{ attribute.type.name }}( self.__requester, attributes[ "{{ attribute.name }}" ], completion = LazyCompletion )
|
||||
self.__{{ attribute.name }} = {% if attribute.type.name != class.name %}{{ attribute.type.name }}.{% endif %}{{ attribute.type.name }}( self.__requester, attributes[ "{{ attribute.name }}" ], completed = False )
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
@@ -77,7 +77,7 @@
|
||||
self.__{{ attribute.name }} = attributes[ "{{ attribute.name }}" ]
|
||||
{% else %}
|
||||
self.__{{ attribute.name }} = [
|
||||
{% if attribute.type.name != class.name %}{{ attribute.type.name }}.{% endif %}{{ attribute.type.name }}( self.__requester, element, completion = LazyCompletion )
|
||||
{% if attribute.type.name != class.name %}{{ attribute.type.name }}.{% endif %}{{ attribute.type.name }}( self.__requester, element, completed = False )
|
||||
for element in attributes[ "{{ attribute.name }}" ]
|
||||
]
|
||||
{% endif %}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{% else %}
|
||||
|
||||
{% if method.type.cardinality == "scalar" %}
|
||||
return {% if method.type.name != class.name %}{{ method.type.name }}.{% endif %}{{ method.type.name }}( self.__requester, data, completion = NoCompletion )
|
||||
return {% if method.type.name != class.name %}{{ method.type.name }}.{% endif %}{{ method.type.name }}( self.__requester, data, completed = True )
|
||||
{% endif %}
|
||||
|
||||
{% if method.type.cardinality == "list" %}
|
||||
|
||||
@@ -10,14 +10,12 @@ import {{ dependency }}
|
||||
{% endfor %}
|
||||
|
||||
class {{ class.name }}( object ):
|
||||
def __init__( self, requester, attributes, completion ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
self.__requester = requester
|
||||
self.__initAttributes()
|
||||
self.__useAttributes( attributes )
|
||||
{% if class.isCompletable %}
|
||||
self.__completed = completion != LazyCompletion
|
||||
if completion == ImmediateCompletion:
|
||||
self.__complete() # pragma: no cover
|
||||
self.__completed = completed
|
||||
{% endif %}
|
||||
|
||||
{% include "GithubObject.PublicAttributes.py" %}
|
||||
|
||||
Reference in New Issue
Block a user