{#- Template for "Attributes" sections in docstrings. This template renders a list of documented attributes in the format specified with the [`docstring_section_style`][] configuration option. Context: section (griffe.DocstringSectionAttributes): The section to render. -#} {% block logs scoped %} {#- Logging block. This block can be used to log debug messages, deprecation messages, warnings, etc. -#} {{ log.debug("Rendering attributes section") }} {% endblock logs %} {% import "language.html.jinja" as lang with context %} {#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} {#- Block for the `table` section style. -#}
{{ section.title or lang.t("Attributes:") }}
| {{ lang.t("Name") }} | {{ lang.t("Type") }} | {{ lang.t("Description") }} |
|---|---|---|
|
{% if attribute.annotation %}
{% with expression = attribute.annotation %}
{% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
|
{{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
|
{{ section.title or lang.t("Attributes:") }}
{{ attribute.name }}
{% if attribute.annotation %}
{% with expression = attribute.annotation %}
({% include "expression.html.jinja" with context %})
{% endwith %}
{% endif %}
–
| {{ (section.title or lang.t("ATTRIBUTE")).rstrip(":").upper() }} | {{ lang.t("DESCRIPTION") }} |
|---|---|
|
{{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
{% if attribute.annotation %}
{{ lang.t("TYPE:") }}
{% with expression = attribute.annotation %}
|