mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Manual implementation of typing of last parameters
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user