{#- 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 %} {% import "language"|get_template as lang with context %} {#- Language module providing the `t` translation method. -#}
')|safe if config.show_symbol_type_toc else '') +
(
function.docstring.value.split("\n", 1)[0] if "cases/" in function.relative_filepath|string and function.docstring.value else
function.name
),
) %}
{% block heading scoped %}
{#- Heading block.
This block renders the heading for the function.
-#}
{% if not ("cases/" in function.relative_filepath|string and function.docstring.value) %}
{% if config.separate_signature %}
{{ config.heading if config.heading and root else function_name }}
{% else %}
{{ function_name }}{% include "signature"|get_template with context %}
{% endif %}
{% endif %}
{% endblock heading %}
{% endfilter %}