From e93d166a14d0944d30ff2f28f21f2262ac396bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 3 Dec 2024 17:14:37 +0100 Subject: [PATCH] fix: Respect `show_signature_annotations` option for attribute signatures in headings Issue-griffe-pydantic#9: https://github.com/mkdocstrings/griffe-pydantic/issues/9 --- .../python/templates/material/_base/attribute.html.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja index 0716b17..7f3707b 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja @@ -52,7 +52,7 @@ Context: {{ attribute_name }} {% else %} {%+ filter highlight(language="python", inline=True) %} - {{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %} + {{ attribute_name }}{% if attribute.annotation and config.show_signature_annotations %}: {{ attribute.annotation }}{% endif %} {% if attribute.value %} = {{ attribute.value }}{% endif %} {% endfilter %} {% endif %}