mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-11 19:10:58 +00:00
28 lines
847 B
ReStructuredText
28 lines
847 B
ReStructuredText
{%- if obj.display %}
|
|
{% if sphinx_version >= (2, 1) %}
|
|
.. method:: {{ obj.short_name }}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %}
|
|
|
|
{% for (args, return_annotation) in obj.overloads %}
|
|
{{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %}
|
|
|
|
{% endfor %}
|
|
{% if obj.properties %}
|
|
{% for property in obj.properties %}
|
|
:{{ property }}:
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
{% else %}
|
|
.. {{ obj.method_type }}:: {{ obj.short_name }}({{ obj.args }})
|
|
{% for (args, return_annotation) in obj.overloads %}
|
|
{{ " " * (obj.method_type | length) }} {{ obj.short_name }}({{ args }})
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
{% if obj.docstring %}
|
|
{{ obj.docstring|prepare_docstring|indent(3) }}
|
|
{% endif %}
|
|
{% endif %}
|