1
0
Fork 0
anta/docs/templates/python/material/docstring.html
Daniel Baumann 2265bd9c67
Merging upstream version 0.14.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 11:39:09 +01:00

36 lines
2.2 KiB
HTML

{% if docstring_sections %}
{{ log.debug("Rendering docstring") }}
{% for section in docstring_sections %}
{% if config.show_docstring_description and section.kind.value == "text" %}
{% if not (config.anta_hide_test_module_description and module == obj) %}
{{ section.value|convert_markdown(heading_level, html_id) }}
{% endif %}
{% elif config.show_docstring_attributes and section.kind.value == "attributes" %}
{% include "docstring/attributes.html" with context %}
{% elif config.show_docstring_functions and section.kind.value == "functions" %}
{% include "docstring/functions.html" with context %}
{% elif config.show_docstring_classes and section.kind.value == "classes" %}
{% include "docstring/classes.html" with context %}
{% elif config.show_docstring_modules and section.kind.value == "modules" %}
{% include "docstring/modules.html" with context %}
{% elif config.show_docstring_parameters and section.kind.value == "parameters" %}
{% include "docstring/parameters.html" with context %}
{% elif config.show_docstring_other_parameters and section.kind.value == "other parameters" %}
{% include "docstring/other_parameters.html" with context %}
{% elif config.show_docstring_raises and section.kind.value == "raises" %}
{% include "docstring/raises.html" with context %}
{% elif config.show_docstring_warns and section.kind.value == "warns" %}
{% include "docstring/warns.html" with context %}
{% elif config.show_docstring_yields and section.kind.value == "yields" %}
{% include "docstring/yields.html" with context %}
{% elif config.show_docstring_receives and section.kind.value == "receives" %}
{% include "docstring/receives.html" with context %}
{% elif config.show_docstring_returns and section.kind.value == "returns" %}
{% include "docstring/returns.html" with context %}
{% elif config.show_docstring_examples and section.kind.value == "examples" %}
{% include "docstring/examples.html" with context %}
{% elif config.show_docstring_description and section.kind.value == "admonition" %}
{% include "docstring/admonition.html" with context %}
{% endif %}
{% endfor %}
{% endif %}