mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-11 19:10:58 +00:00
33 lines
765 B
ReStructuredText
33 lines
765 B
ReStructuredText
{% if obj.display %}
|
|
.. {{ obj.type }}:: {{ obj.name }}
|
|
{%+ if obj.value is not none or obj.annotation is not none -%}
|
|
:annotation:
|
|
{%- if obj.annotation %} :{{ obj.annotation }}
|
|
{%- endif %}
|
|
{%- if obj.value is not none %} = {%
|
|
if obj.value is string and obj.value.splitlines()|count > 1 -%}
|
|
Multiline-String
|
|
|
|
.. raw:: html
|
|
|
|
<details><summary>Show Value</summary>
|
|
|
|
.. code-block:: text
|
|
:linenos:
|
|
|
|
{{ obj.value|indent(width=8) }}
|
|
|
|
.. raw:: html
|
|
|
|
</details>
|
|
|
|
{%- else -%}
|
|
{{ obj.value|string|truncate(100) }}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{% endif %}
|
|
|
|
|
|
{{ obj.docstring|prepare_docstring|indent(3) }}
|
|
{% endif %}
|