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
@@ -1,21 +1,17 @@
{% for parameter in method.mandatoryParameters %}
{% if parameter.type.name != "@todo" %}
{% with simple_or_complex=parameter.type.simple|yesno:"simple,complex" %}
{% with template_name="GithubObject.IsInstance."|add:parameter.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
{% with simple_or_complex=parameter.type.simple|yesno:"simple,complex" %}
{% with template_name="GithubObject.IsInstance."|add:parameter.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
assert {% include template_name with variable=parameter.name type=parameter.type only %}, {{ parameter.name }}
{% endwith %}
{% endwith %}
{% endif %}
{% endwith %}
{% endfor %}
{% for parameter in method.optionalParameters %}
{% if parameter.type.name != "@todo" %}
{% with simple_or_complex=parameter.type.simple|yesno:"simple,complex" %}
{% with template_name="GithubObject.IsInstance."|add:parameter.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
{% with simple_or_complex=parameter.type.simple|yesno:"simple,complex" %}
{% with template_name="GithubObject.IsInstance."|add:parameter.type.cardinality|add:"."|add:simple_or_complex|add:".py" %}
assert {{ parameter.name }} is GithubObject.NotSet or {% include template_name with variable=parameter.name type=parameter.type only %}, {{ parameter.name }}
{% endwith %}
{% endwith %}
{% endif %}
{% endwith %}
{% endfor %}
{% if method.variadicParameter %}