Skip to content

Commit 3d8724e

Browse files
committed
fix: Don't show None as return annotation of class signatures
Issue #85: #85
1 parent 04dd092 commit 3d8724e

File tree

1 file changed

+4
-1
lines changed
  • src/mkdocstrings_handlers/python/templates/material/_base

1 file changed

+4
-1
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/signature.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
{%- endif -%}
5656
{%- endfor -%}
5757
)
58-
{%- if config.show_signature_annotations and function.annotation %} -> {% if config.separate_signature and config.signature_crossrefs -%}
58+
{%- if config.show_signature_annotations
59+
and function.annotation
60+
and not (config.merge_init_into_class and function.name == "__init__" )
61+
%} -> {% if config.separate_signature and config.signature_crossrefs -%}
5962
{%- with expression = function.annotation %}{% include "expression.html" with context %}{%- endwith -%}
6063
{%- else -%}
6164
{{ function.annotation|safe }}

0 commit comments

Comments
 (0)