Debian Codegraph @

src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja

raw
1 {#- Template for "Receives" sections in docstrings.
2
3 This template renders a list of documented received values (generators) in the format
4 specified with the [`docstring_section_style`][] configuration option.
5
6 Context:
7 section (griffe.DocstringSectionAttributes): The section to render.
8 -#}
9
10 {% block logs scoped %}
11 {#- Logging block.
12
13 This block can be used to log debug messages, deprecation messages, warnings, etc.
14 -#}
15 {{ log.debug() }}
16 {% endblock %}
17
18 {% import "language.html.jinja" as lang with context %}
19 {#- Language module providing the `t` translation method. -#}
20
21 <table class="field-list">
22 <colgroup>
23 <col class="field-name" />
24 <col class="field-body" />
25 </colgroup>
26 <tbody valign="top">
27 <tr class="field">
28 <th class="field-name">{{ section.title or lang.t("Receives:") }}</th>
29 <td class="field-body">
30 <ul class="first simple">
31 {% for receives in section.value %}
32 <li>
33 {% if receives.name %}<b><code>{{ receives.name }}</code></b>{% endif %}
34 {% if receives.annotation %}
35 {% with expression = receives.annotation, backlink_type = "received-by" %}
36 {% if receives.name %}({% endif %}
37 <code>{% include "expression.html.jinja" with context %}</code>
38 {% if receives.name %}){% endif %}
39 {% endwith %}
40 {% endif %}
41 –
42 <div class="doc-md-description">
43 {{ receives.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
44 </div>
45 </li>
46 {% endfor %}
47 </ul>
48 </td>
49 </tr>
50 </tbody>
51 </table>