diff options
Diffstat (limited to 'docs/templates/python/material/docstring.html.jinja')
-rw-r--r-- | docs/templates/python/material/docstring.html.jinja | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/templates/python/material/docstring.html.jinja b/docs/templates/python/material/docstring.html.jinja new file mode 100644 index 0000000..b12ae7e --- /dev/null +++ b/docs/templates/python/material/docstring.html.jinja @@ -0,0 +1,36 @@ +{% 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 %} |