Manual implementation of typing of last parameters

This commit is contained in:
Vincent Jacques
2012-06-01 18:54:35 +01:00
parent ed75bb74ec
commit 9954a3fd1b
21 changed files with 160 additions and 77 deletions
@@ -12,14 +12,12 @@
def _useAttributes( self, attributes ):
{% for attribute in class.attributes|dictsort:"name" %}
{% if attribute.type.name != "@todo" %}
{% with simple_or_complex=attribute.type.simple|yesno:"simple,complex_as_dict" %}
{% with simple_or_complex=attribute.type.simple|yesno:"simple,complex_as_dict" %}
if "{{ attribute.name }}" in attributes: # pragma no branch
{% with template_name="GithubObject.IsInstance."|add:attribute.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
{% with template_name="GithubObject.IsInstance."|add:attribute.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
assert attributes[ "{{ attribute.name }}" ] is None or {% include template_name with variable="attributes[ \""|add:attribute.name|add:"\" ]"|safe type=attribute.type only %}, attributes[ "{{ attribute.name }}" ]
{% endwith %}
{% endwith %}
{% endif %}
{% endwith %}
{% endwith %}
{% with simple_or_complex=attribute.type.simple|yesno:"simple,complex" %}
{% with template_name="GithubObject.AttributeValue."|add:simple_or_complex|add:".py" %}