From 9e0204930cf4dc973ba8eb41c471fc0132e1631f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Thu, 24 Aug 2023 12:29:30 +0200 Subject: [PATCH] refactor: Never show full path in separate signature since it would appear in the heading already --- .../python/templates/material/_base/attribute.html | 2 +- .../python/templates/material/_base/class.html | 2 +- .../python/templates/material/_base/function.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html index 1d416a3b..404532c6 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html @@ -45,7 +45,7 @@ {% if config.separate_signature %} {% filter highlight(language="python", inline=False) %} {% filter format_code(config.line_length) %} - {% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %} + {{ attribute.name }} {% if attribute.annotation %}: {{ attribute.annotation|safe }}{% endif %} {% if attribute.value %} = {{ attribute.value|safe }}{% endif %} {% endfilter %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html b/src/mkdocstrings_handlers/python/templates/material/_base/class.html index af019330..f137686f 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html @@ -49,7 +49,7 @@ {% if "__init__" in class.members %} {% with function = class.members["__init__"] %} {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %} - {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %} + {{ class.name }} {% endfilter %} {% endwith %} {% endif %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/function.html b/src/mkdocstrings_handlers/python/templates/material/_base/function.html index a224f4de..bccafc0c 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/function.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/function.html @@ -45,7 +45,7 @@ {% block signature scoped %} {% if config.separate_signature %} {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %} - {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %} + {{ function.name }} {% endfilter %} {% endif %} {% endblock signature %}