Skip to content

Commit

Permalink
feat: Render function overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Oct 12, 2024
1 parent 0176b83 commit 0f2c25c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,18 @@ Context:
{% block signature scoped %}
{#- Signature block.
This block renders the signature for the function.
This block renders the signature for the function,
as well as its overloaded signatures if any.
-#}
{% if function.overloads %}
<div class="doc-overloads">
{% for overload in function.overloads %}
{% filter format_signature(overload, config.line_length, annotations=True, crossrefs=config.signature_crossrefs) %}
{{ overload.name }}
{% endfilter %}
{% endfor %}
</div>
{% endif %}
{% if config.separate_signature %}
{% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
{{ function.name }}
Expand Down

0 comments on commit 0f2c25c

Please sign in to comment.