{#- Template for Python functions. This template renders a Python function or method. Context: function (griffe.Function): The function to render. root (bool): Whether this is the root object, injected with `:::` in a Markdown page. heading_level (int): The HTML heading level to use. config (dict): The configuration options. -#} {% block logs scoped %} {#- Logging block. This block can be used to log debug messages, deprecation messages, warnings, etc. -#} {{ log.debug("Rendering " + function.path) }} {% 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. -#}
')|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else function.name),
) %}
{% block heading scoped %}
{#- Heading block.
This block renders the heading for the function.
-#}
{% if config.show_symbol_type_heading %}{% endif %}
{% if config.separate_signature %}
{{ config.heading if config.heading and root else function_name }}
{% else %}
{%+ filter highlight(language="python", inline=True) -%}
{#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
{{ function_name }}{% include "signature"|get_template with context %}
{%- endfilter %}
{% endif %}
{% endblock heading %}
{% block labels scoped %}
{#- Labels block.
This block renders the labels for the function.
-#}
{% with labels = function.labels %}
{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
{% include "labels"|get_template with context %}
{% endwith %}
{% endblock labels %}
{% endfilter %}
{% block signature scoped %}
{#- Signature block.
This block renders the signature for the function,
as well as its overloaded signatures if any.
-#}
{% if function.overloads and config.show_overloads %}
')|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else function.name),
hidden=True,
) %}
{% endfilter %}
{% endif %}
{% set heading_level = heading_level - 1 %}
{% endif %}
{%- if function.relative_filepath.is_absolute() -%}
{{ function.relative_package_filepath }}
{%- else -%}
{{ function.relative_filepath }}
{%- endif -%}