From d57aea6a898050115a089e6f86c5314d7daf97e8 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 29 May 2012 18:43:20 +0100 Subject: [PATCH] Split template for GithubObject --- .../description.human_readable.json | 2 +- .../description.normalized.json | 6 +- .../templates/GithubObject.Implementation.py | 87 ++++++++++++++ .../GithubObject.MethodBody.CheckArguments.py | 92 +++++++++++++++ .../GithubObject.MethodBody.DoRequest.py | 99 +--------------- .../GithubObject.PublicAttributes.py | 8 ++ .../templates/GithubObject.PublicMethods.py | 6 + codegen/templates/GithubObject.py | 107 +----------------- 8 files changed, 203 insertions(+), 204 deletions(-) create mode 100644 codegen/templates/GithubObject.Implementation.py create mode 100644 codegen/templates/GithubObject.MethodBody.CheckArguments.py create mode 100644 codegen/templates/GithubObject.PublicAttributes.py create mode 100644 codegen/templates/GithubObject.PublicMethods.py diff --git a/codegen/JsonDescriptionOfGithubApiV3/description.human_readable.json b/codegen/JsonDescriptionOfGithubApiV3/description.human_readable.json index cfc6838d..6d491cfa 100644 --- a/codegen/JsonDescriptionOfGithubApiV3/description.human_readable.json +++ b/codegen/JsonDescriptionOfGithubApiV3/description.human_readable.json @@ -1089,7 +1089,7 @@ { "type": "argument", "value": [ "repo", "name" ] }, { "type": "constant", "value": "/forks" } ], - "url_parameters": [ + "urlParameters": [ { "name": "org", "value": [ { "type": "attribute", "value": [ "login" ] } ] } ], "information": "status" diff --git a/codegen/JsonDescriptionOfGithubApiV3/description.normalized.json b/codegen/JsonDescriptionOfGithubApiV3/description.normalized.json index c22c6225..49418249 100644 --- a/codegen/JsonDescriptionOfGithubApiV3/description.normalized.json +++ b/codegen/JsonDescriptionOfGithubApiV3/description.normalized.json @@ -6343,7 +6343,8 @@ "value": "/forks" } ], - "url_parameters": [ + "information": "status", + "urlParameters": [ { "name": "org", "value": [ @@ -6356,8 +6357,7 @@ ] } ], - "verb": "POST", - "information": "status" + "verb": "POST" }, "isMutation": false, "optionalParameters": [], diff --git a/codegen/templates/GithubObject.Implementation.py b/codegen/templates/GithubObject.Implementation.py new file mode 100644 index 00000000..92a407a7 --- /dev/null +++ b/codegen/templates/GithubObject.Implementation.py @@ -0,0 +1,87 @@ +{% if class.identity %} + @property + def _identity( self ): + return {% include "GithubObject.Concatenation.py" with concatenation=class.identity only %} +{% endif %} + + def __initAttributes( self ): +{% for attribute in class.attributes|dictsort:"name" %} + self.__{{ attribute.name }} = None +{% endfor %} + +{% if class.isCompletable %} + def __completeIfNeeded( self, testedAttribute ): + if not self.__completed and testedAttribute is None: + self.__complete() # pragma: no cover + + def __complete( self ): # pragma: no cover + status, headers, data = self.__requester.request( + "GET", + self.__url, + None, + None + ) + self.__useAttributes( data ) + self.__completed = True +{% endif %} + + def __useAttributes( self, attributes ): +{% for attribute in class.attributes|dictsort:"name" %} + if "{{ attribute.name }}" in attributes and attributes[ "{{ attribute.name }}" ] is not None: # pragma no branch + +{% if attribute.type.cardinality == "scalar" %} + + {% if attribute.type.simple %} + {% if attribute.type.name == "string" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], ( str, unicode ) ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% if attribute.type.name == "integer" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], int ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% if attribute.type.name == "bool" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], bool ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% else %} + assert isinstance( attributes[ "{{ attribute.name }}" ], dict ), attributes[ "{{ attribute.name }}" ] + {% endif %} + +{% else %} + + {% if attribute.type.simple %} + {% if attribute.type.name == "string" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], ( str, unicode ) ) ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% if attribute.type.name == "integer" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], int ) ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% if attribute.type.name == "bool" %} + assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], bool ) ), attributes[ "{{ attribute.name }}" ] + {% endif %} + {% else %} + assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], dict ) ), attributes[ "{{ attribute.name }}" ] + {% endif %} + +{% endif %} + +{% if attribute.type.cardinality == "scalar" %} + + {% 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 ) + {% endif %} + +{% else %} + + {% 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, element, completion = LazyCompletion ) + for element in attributes[ "{{ attribute.name }}" ] + ] + {% endif %} + +{% endif %} + +{% endfor %} diff --git a/codegen/templates/GithubObject.MethodBody.CheckArguments.py b/codegen/templates/GithubObject.MethodBody.CheckArguments.py new file mode 100644 index 00000000..f984e632 --- /dev/null +++ b/codegen/templates/GithubObject.MethodBody.CheckArguments.py @@ -0,0 +1,92 @@ +{% for parameter in method.mandatoryParameters %} + {% if parameter.type.cardinality == "scalar" %} + + {% if parameter.type.simple %} + {% if parameter.type.name == "string" %} + assert isinstance( {{ parameter.name }}, ( str, unicode ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "integer" %} + assert isinstance( {{ parameter.name }}, int ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "bool" %} + assert isinstance( {{ parameter.name }}, bool ), {{ parameter.name }} + {% endif %} + {% else %} + assert isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }} + {% endif %} + + {% else %} + + {% if parameter.type.simple %} + {% if parameter.type.name == "string" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], ( str, unicode ) ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "integer" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], int ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "bool" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], bool ) ), {{ parameter.name }} + {% endif %} + {% else %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], {{ parameter.type.name }}.{{ parameter.type.name }} ) ), {{ parameter.name }} + {% endif %} + + {% endif %} +{% endfor %} +{% for parameter in method.optionalParameters %} + {% if parameter.type.name != "@todo" %} + if {{ parameter.name }} is not DefaultValueForOptionalParameters: + {% endif %} + + {% if parameter.type.cardinality == "scalar" %} + + {% if parameter.type.simple %} + {% if parameter.type.name == "string" %} + assert isinstance( {{ parameter.name }}, ( str, unicode ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "integer" %} + assert isinstance( {{ parameter.name }}, int ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "bool" %} + assert isinstance( {{ parameter.name }}, bool ), {{ parameter.name }} + {% endif %} + {% else %} + assert isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }} + {% endif %} + + {% else %} + + {% if parameter.type.simple %} + {% if parameter.type.name == "string" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], ( str, unicode ) ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "integer" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], int ) ), {{ parameter.name }} + {% endif %} + {% if parameter.type.name == "bool" %} + assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], bool ) ), {{ parameter.name }} + {% endif %} + {% else %} + assert isinstance( {{ parameter.name }}, list ) and ( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], {{ parameter.type.name }}.{{ parameter.type.name }} ) ), {{ parameter.name }} + {% endif %} + + {% endif %} +{% endfor %} + +{% if method.variadicParameter %} + {% if method.variadicParameter.type.name != "@todo" %} + {% if method.variadicParameter.type.simple %} + {% if method.variadicParameter.type.name == "string" %} + assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], ( str, unicode ) ), {{ method.variadicParameter.name }}s + {% endif %} + {% if parameter.type.name == "integer" %} + assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], int ), {{ method.variadicParameter.name }}s + {% endif %} + {% if parameter.type.name == "bool" %} + assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], bool ), {{ method.variadicParameter.name }}s + {% endif %} + {% else %} + assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], {{ method.variadicParameter.type.name }}.{{ method.variadicParameter.type.name }} ), {{ method.variadicParameter.name }}s + {% endif %} + {% endif %} +{% endif %} diff --git a/codegen/templates/GithubObject.MethodBody.DoRequest.py b/codegen/templates/GithubObject.MethodBody.DoRequest.py index a1efdd4f..0c4279c4 100644 --- a/codegen/templates/GithubObject.MethodBody.DoRequest.py +++ b/codegen/templates/GithubObject.MethodBody.DoRequest.py @@ -1,96 +1,3 @@ -{% if method.variadicParameter %} - {% if method.variadicParameter.type.name != "@todo" %} - {% if method.variadicParameter.type.simple %} - {% if method.variadicParameter.type.name == "string" %} - assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], ( str, unicode ) ), {{ method.variadicParameter.name }}s - {% endif %} - {% if parameter.type.name == "integer" %} - assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], int ), {{ method.variadicParameter.name }}s - {% endif %} - {% if parameter.type.name == "bool" %} - assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], bool ), {{ method.variadicParameter.name }}s - {% endif %} - {% else %} - assert len( {{ method.variadicParameter.name }}s ) == 0 or isinstance( {{ method.variadicParameter.name }}s[ 0 ], {{ method.variadicParameter.type.name }}.{{ method.variadicParameter.type.name }} ), {{ method.variadicParameter.name }}s - {% endif %} - {% endif %} -{% else %} - {% for parameter in method.mandatoryParameters %} - {% if parameter.type.cardinality == "scalar" %} - - {% if parameter.type.simple %} - {% if parameter.type.name == "string" %} - assert isinstance( {{ parameter.name }}, ( str, unicode ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "integer" %} - assert isinstance( {{ parameter.name }}, int ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "bool" %} - assert isinstance( {{ parameter.name }}, bool ), {{ parameter.name }} - {% endif %} - {% else %} - assert isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }} - {% endif %} - - {% else %} - - {% if parameter.type.simple %} - {% if parameter.type.name == "string" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], ( str, unicode ) ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "integer" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], int ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "bool" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], bool ) ), {{ parameter.name }} - {% endif %} - {% else %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], {{ parameter.type.name }}.{{ parameter.type.name }} ) ), {{ parameter.name }} - {% endif %} - - {% endif %} - {% endfor %} - {% for parameter in method.optionalParameters %} - {% if parameter.type.name != "@todo" %} - if {{ parameter.name }} is not DefaultValueForOptionalParameters: - {% endif %} - - {% if parameter.type.cardinality == "scalar" %} - - {% if parameter.type.simple %} - {% if parameter.type.name == "string" %} - assert isinstance( {{ parameter.name }}, ( str, unicode ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "integer" %} - assert isinstance( {{ parameter.name }}, int ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "bool" %} - assert isinstance( {{ parameter.name }}, bool ), {{ parameter.name }} - {% endif %} - {% else %} - assert isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }} - {% endif %} - - {% else %} - - {% if parameter.type.simple %} - {% if parameter.type.name == "string" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], ( str, unicode ) ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "integer" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], int ) ), {{ parameter.name }} - {% endif %} - {% if parameter.type.name == "bool" %} - assert isinstance( {{ parameter.name }}, list ) and ( len( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], bool ) ), {{ parameter.name }} - {% endif %} - {% else %} - assert isinstance( {{ parameter.name }}, list ) and ( {{ parameter.name }} ) == 0 or isinstance( {{ parameter.name }}[ 0 ], {{ parameter.type.name }}.{{ parameter.type.name }} ) ), {{ parameter.name }} - {% endif %} - - {% endif %} - {% endfor %} -{% endif %} - {% if method.request.postParameters %} {% if method.variadicParameter %} {% if method.variadicParameter.type.simple %} @@ -111,9 +18,9 @@ {% endif %} {% endif %} -{% if method.request.url_parameters %} +{% if method.request.urlParameters %} url_parameters = { - {% for parameter in method.request.url_parameters %} + {% for parameter in method.request.urlParameters %} "{{ parameter.name }}": {% include "GithubObject.Concatenation.py" with concatenation=parameter.value only %}, {% endfor %} } @@ -122,7 +29,7 @@ status, headers, data = self.__requester.request( "{{ method.request.verb }}", {% include "GithubObject.Concatenation.py" with concatenation=method.request.url only %}, -{% if method.request.url_parameters %} +{% if method.request.urlParameters %} url_parameters, {% else %} None, diff --git a/codegen/templates/GithubObject.PublicAttributes.py b/codegen/templates/GithubObject.PublicAttributes.py new file mode 100644 index 00000000..92f8416c --- /dev/null +++ b/codegen/templates/GithubObject.PublicAttributes.py @@ -0,0 +1,8 @@ +{% for attribute in class.attributes|dictsort:"name" %} + @property + def {{ attribute.name }}( self ): +{% if class.isCompletable %} + self.__completeIfNeeded( self.__{{ attribute.name }} ) +{% endif %} + return self.__{{ attribute.name }} +{% endfor %} diff --git a/codegen/templates/GithubObject.PublicMethods.py b/codegen/templates/GithubObject.PublicMethods.py new file mode 100644 index 00000000..bac34efa --- /dev/null +++ b/codegen/templates/GithubObject.PublicMethods.py @@ -0,0 +1,6 @@ +{% for method in class.methods|dictsort:"name" %} + def {{ method.name|join:"_" }}( {% include "GithubObject.Parameters.py" with function=method only %} ): + {% include "GithubObject.MethodBody.CheckArguments.py" %} + {% include "GithubObject.MethodBody.DoRequest.py" %} + {% include "GithubObject.MethodBody.UseResult.py" %} +{% endfor %} diff --git a/codegen/templates/GithubObject.py b/codegen/templates/GithubObject.py index 9bc9090b..9c8b71f8 100644 --- a/codegen/templates/GithubObject.py +++ b/codegen/templates/GithubObject.py @@ -20,109 +20,8 @@ class {{ class.name }}( object ): self.__complete() # pragma: no cover {% endif %} -{% for attribute in class.attributes|dictsort:"name" %} - @property - def {{ attribute.name }}( self ): -{% if class.isCompletable %} - self.__completeIfNeeded( self.__{{ attribute.name }} ) -{% endif %} - return self.__{{ attribute.name }} -{% endfor %} +{% include "GithubObject.PublicAttributes.py" %} -{% for method in class.methods|dictsort:"name" %} - def {{ method.name|join:"_" }}( {% include "GithubObject.Parameters.py" with function=method only %} ): - {% if method.request %} - {% include "GithubObject.MethodBody.DoRequest.py" %} - {% include "GithubObject.MethodBody.UseResult.py" %} - {% else %} - pass - {% endif %} -{% endfor %} +{% include "GithubObject.PublicMethods.py" %} -{% if class.identity %} - @property - def _identity( self ): - return {% include "GithubObject.Concatenation.py" with concatenation=class.identity only %} -{% endif %} - - def __initAttributes( self ): -{% for attribute in class.attributes|dictsort:"name" %} - self.__{{ attribute.name }} = None -{% endfor %} - -{% if class.isCompletable %} - def __completeIfNeeded( self, testedAttribute ): - if not self.__completed and testedAttribute is None: - self.__complete() # pragma: no cover - - def __complete( self ): # pragma: no cover - status, headers, data = self.__requester.request( - "GET", - self.__url, - None, - None - ) - self.__useAttributes( data ) - self.__completed = True -{% endif %} - - def __useAttributes( self, attributes ): -{% for attribute in class.attributes|dictsort:"name" %} - if "{{ attribute.name }}" in attributes and attributes[ "{{ attribute.name }}" ] is not None: # pragma no branch - -{% if attribute.type.cardinality == "scalar" %} - - {% if attribute.type.simple %} - {% if attribute.type.name == "string" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], ( str, unicode ) ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% if attribute.type.name == "integer" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], int ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% if attribute.type.name == "bool" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], bool ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% else %} - assert isinstance( attributes[ "{{ attribute.name }}" ], dict ), attributes[ "{{ attribute.name }}" ] - {% endif %} - -{% else %} - - {% if attribute.type.simple %} - {% if attribute.type.name == "string" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], ( str, unicode ) ) ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% if attribute.type.name == "integer" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], int ) ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% if attribute.type.name == "bool" %} - assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], bool ) ), attributes[ "{{ attribute.name }}" ] - {% endif %} - {% else %} - assert isinstance( attributes[ "{{ attribute.name }}" ], list ) and ( len( attributes[ "{{ attribute.name }}" ] ) == 0 or isinstance( attributes[ "{{ attribute.name }}" ][ 0 ], dict ) ), attributes[ "{{ attribute.name }}" ] - {% endif %} - -{% endif %} - -{% if attribute.type.cardinality == "scalar" %} - - {% 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 ) - {% endif %} - -{% else %} - - {% 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, element, completion = LazyCompletion ) - for element in attributes[ "{{ attribute.name }}" ] - ] - {% endif %} - -{% endif %} - -{% endfor %} +{% include "GithubObject.Implementation.py" %}