diff --git a/autoapi/templates/python/class.rst b/autoapi/templates/python/class.rst index df5edff..a584dcd 100644 --- a/autoapi/templates/python/class.rst +++ b/autoapi/templates/python/class.rst @@ -1,7 +1,9 @@ {% if obj.display %} .. py:{{ obj.type }}:: {{ obj.short_name }}{% if obj.args %}({{ obj.args }}){% endif %} + {% for (args, return_annotation) in obj.overloads %} - {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} + {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} + {% endfor %} diff --git a/autoapi/templates/python/function.rst b/autoapi/templates/python/function.rst index b00d5c2..778ba9a 100644 --- a/autoapi/templates/python/function.rst +++ b/autoapi/templates/python/function.rst @@ -2,7 +2,7 @@ .. py:function:: {{ obj.short_name }}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %} {% for (args, return_annotation) in obj.overloads %} - {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} + {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} {% endfor %} {% for property in obj.properties %} diff --git a/autoapi/templates/python/method.rst b/autoapi/templates/python/method.rst index 723cb7b..f50a1bd 100644 --- a/autoapi/templates/python/method.rst +++ b/autoapi/templates/python/method.rst @@ -2,7 +2,7 @@ .. py:method:: {{ obj.short_name }}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %} {% for (args, return_annotation) in obj.overloads %} - {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} + {{ obj.short_name }}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} {% endfor %} {% if obj.properties %} diff --git a/docs/changes/+a134e154.bugfix.rst b/docs/changes/+a134e154.bugfix.rst new file mode 100644 index 0000000..05a8a2b --- /dev/null +++ b/docs/changes/+a134e154.bugfix.rst @@ -0,0 +1 @@ +Fix class overrides not rendering correctly.