{#- Template for "Parameters" sections in docstrings. This template renders a list of documented parameters 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 parameters section") }} {% endblock logs %} {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #} {% import "language"|get_template 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("Parameters:") }}

{% for parameter in section.value %} {% endfor %}
{{ lang.t("Name") }} {{ lang.t("Type") }} {{ lang.t("Description") }} {{ lang.t("Default") }}
{% if config.parameter_headings %} {% filter heading( heading_level + 1, role="param", id=html_id ~ "(" ~ parameter.name ~ ")", class="doc doc-heading doc-heading-parameter", toc_label=(' '|safe if config.show_symbol_type_toc else '') + parameter.name, ) %} {{ parameter.name }} {% endfilter %} {% else %} {{ parameter.name }} {% endif %} {% if parameter.annotation %} {% with expression = parameter.annotation, backlink_type = "used-by" %} {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #} {% include "expression"|get_template with context %} {% endwith %} {% endif %}
{{ parameter.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
{% if parameter.default %} {% with expression = parameter.default, backlink_type = "used-by" %} {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #} {% include "expression"|get_template with context %} {% endwith %} {% else %} {{ lang.t("required") }} {% endif %}
{% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Parameters:") }}

{% endblock list_style %} {% elif config.docstring_section_style == "spacy" %} {% block spacy_style scoped %} {#- Block for the `spacy` section style. -#} {% for parameter in section.value %} {% endfor %}
{{ (section.title or lang.t("PARAMETER")).rstrip(":").upper() }} {{ lang.t("DESCRIPTION") }}
{% if config.parameter_headings %} {% filter heading( heading_level + 1, role="param", id=html_id ~ "(" ~ parameter.name ~ ")", class="doc doc-heading doc-heading-parameter", toc_label=(' '|safe if config.show_symbol_type_toc else '') + parameter.name, ) %} {{ parameter.name }} {% endfilter %} {% else %} {{ parameter.name }} {% endif %}
{{ parameter.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}

{% if parameter.annotation %} {{ lang.t("TYPE:") }} {% with expression = parameter.annotation, backlink_type = "used-by" %} {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #} {% include "expression"|get_template with context %} {% endwith %} {% endif %} {% if parameter.default %} {{ lang.t("DEFAULT:") }} {% with expression = parameter.default, backlink_type = "used-by" %} {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #} {% include "expression"|get_template with context %} {% endwith %} {% endif %}

{% endblock spacy_style %} {% endif %}