Skip to content

Commit 0f2c25c

Browse files
committed
feat: Render function overloads
1 parent 0176b83 commit 0f2c25c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,18 @@ Context:
7777
{% block signature scoped %}
7878
{#- Signature block.
7979
80-
This block renders the signature for the function.
80+
This block renders the signature for the function,
81+
as well as its overloaded signatures if any.
8182
-#}
83+
{% if function.overloads %}
84+
<div class="doc-overloads">
85+
{% for overload in function.overloads %}
86+
{% filter format_signature(overload, config.line_length, annotations=True, crossrefs=config.signature_crossrefs) %}
87+
{{ overload.name }}
88+
{% endfilter %}
89+
{% endfor %}
90+
</div>
91+
{% endif %}
8292
{% if config.separate_signature %}
8393
{% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
8494
{{ function.name }}

0 commit comments

Comments
 (0)