From 8fed314243e3981fc7b527c69cee628e87b10220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Fri, 29 Apr 2022 19:32:27 +0200 Subject: [PATCH] refactor: Reduce number of template debug logs --- .../python/templates/material/_base/children.html | 2 +- .../python/templates/material/_base/docstring.html | 2 +- .../python/templates/material/_base/labels.html | 2 +- .../python/templates/material/_base/signature.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/children.html b/src/mkdocstrings_handlers/python/templates/material/_base/children.html index eac782c..71755ea 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/children.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/children.html @@ -1,5 +1,5 @@ -{{ log.debug("Rendering children of " + obj.path) }} {% if obj.members %} + {{ log.debug("Rendering children of " + obj.path) }}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html index b473a8f..bd1b696 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html @@ -1,5 +1,5 @@ -{{ log.debug("Rendering docstring") }} {% if docstring_sections %} + {{ log.debug("Rendering docstring") }} {% for section in docstring_sections %} {% if section.kind.value == "text" %} {{ section.value|convert_markdown(heading_level, html_id) }} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html index a7e8ec3..e9c20f1 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html @@ -1,5 +1,5 @@ -{{ log.debug("Rendering labels") }} {% if labels %} + {{ log.debug("Rendering labels") }} {% for label in labels %} {{ label }} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/signature.html b/src/mkdocstrings_handlers/python/templates/material/_base/signature.html index fb11688..ca4bbd4 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/signature.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/signature.html @@ -1,5 +1,5 @@ -{{ log.debug("Rendering signature of " + function.path) }} {%- if config.show_signature -%} + {{ log.debug("Rendering signature") }} {%- with -%} {%- set ns = namespace(render_pos_only_separator=True, render_kw_only_separator=True, equal="=") -%}