+
+ {% endif %}
+ {% endblock inheritance_diagram %}
+
{% block docstring scoped %}
{#- Docstring block.
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html
new file mode 100644
index 00000000..ac3e421e
--- /dev/null
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html
@@ -0,0 +1,11 @@
+{% extends "_base/class.html.jinja" %}
+
+{% block logs scoped %}
+ {{ super() }}
+ {# TODO: Switch to a warning after some time. #}
+ {{ log.info(
+ "DeprecationWarning: Extending '_base/class.html' is deprecated, extend '_base/class.html.jinja' instead. " ~
+ "After some time, this message will be logged as a warning, causing strict builds to fail.",
+ once=True,
+ ) }}
+{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja
new file mode 100644
index 00000000..554485d7
--- /dev/null
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/class.html.jinja
@@ -0,0 +1,251 @@
+{#- Template for Python classes.
+
+This template renders a Python class.
+
+Context:
+ class (griffe.Class): The class to render.
+ root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
+ heading_level (int): The HTML heading level to use.
+ config (dict): The configuration options.
+-#}
+
+{% block logs scoped %}
+ {#- Logging block.
+
+ This block can be used to log debug messages, deprecation messages, warnings, etc.
+ -#}
+ {{ log.debug("Rendering " + class.path) }}
+{% endblock logs %}
+
+
+ {% with obj = class, html_id = class.path %}
+
+ {% if root %}
+ {% set show_full_path = config.show_root_full_path %}
+ {% set root_members = True %}
+ {% elif root_members %}
+ {% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
+ {% set root_members = False %}
+ {% else %}
+ {% set show_full_path = config.show_object_full_path %}
+ {% endif %}
+
+ {% set class_name = class.path if show_full_path else class.name %}
+
+ {% if not root or config.show_root_heading %}
+ {% filter heading(
+ heading_level,
+ role="class",
+ id=html_id,
+ class="doc doc-heading",
+ toc_label=(' '|safe if config.show_symbol_type_toc else '') + class.name,
+ ) %}
+
+ {% block heading scoped %}
+ {#- Heading block.
+
+ This block renders the heading for the class.
+ -#}
+ {% if config.show_symbol_type_heading %}{% endif %}
+ {% if config.separate_signature %}
+ {{ class_name }}
+ {% elif config.merge_init_into_class and "__init__" in class.all_members %}
+ {% with function = class.all_members["__init__"] %}
+ {%+ filter highlight(language="python", inline=True) %}
+ {{ class_name }}{% include "signature"|get_template with context %}
+ {% endfilter %}
+ {% endwith %}
+ {% else %}
+ {{ class_name }}
+ {% endif %}
+ {% endblock heading %}
+
+ {% block labels scoped %}
+ {#- Labels block.
+
+ This block renders the labels for the class.
+ -#}
+ {% with labels = class.labels %}
+ {% include "labels"|get_template with context %}
+ {% endwith %}
+ {% endblock labels %}
+
+ {% endfilter %}
+
+ {% block signature scoped %}
+ {#- Signature block.
+
+ This block renders the signature for the class.
+ -#}
+ {% if config.separate_signature and config.merge_init_into_class %}
+ {% if "__init__" in class.all_members %}
+ {% with function = class.all_members["__init__"] %}
+ {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
+ {{ class.name }}
+ {% endfilter %}
+ {% endwith %}
+ {% endif %}
+ {% endif %}
+ {% endblock signature %}
+
+ {% else %}
+ {% if config.show_root_toc_entry %}
+ {% filter heading(heading_level,
+ role="class",
+ id=html_id,
+ toc_label=(' '|safe if config.show_symbol_type_toc else '') + class.name,
+ hidden=True,
+ ) %}
+ {% endfilter %}
+ {% endif %}
+ {% set heading_level = heading_level - 1 %}
+ {% endif %}
+
+
+ {% block contents scoped %}
+ {#- Contents block.
+
+ This block renders the contents of the class.
+ It contains other blocks that users can override.
+ Overriding the contents block allows to rearrange the order of the blocks.
+ -#}
+ {% block bases scoped %}
+ {#- Class bases block.
+
+ This block renders the bases for the class.
+ -#}
+ {% if config.show_bases and class.bases %}
+
+ Bases: {% for expression in class.bases -%}
+ {% include "expression"|get_template with context %}{% if not loop.last %}, {% endif %}
+ {% endfor -%}
+
+ {% endif %}
+ {% endblock bases %}
+
+ {% block inheritance_diagram scoped %}
+ {#- Inheritance diagram block.
+
+ This block renders the inheritance diagram for the class,
+ using Mermaid syntax and a bit of JavaScript to make the nodes clickable,
+ linking to the corresponding class documentation.
+ -#}
+ {% if config.show_inheritance_diagram and class.bases %}
+ {% macro edges(class) %}
+ {% for base in class.resolved_bases %}
+ {{ base.path }} --> {{ class.path }}
+ {{ edges(base) }}
+ {% endfor %}
+ {% endmacro %}
+
+
+ {% for base in class.mro() %}
+
+ {% endfor %}
+
+
+
+*And 8 more private sponsor(s).*
+
From 440cc45b11d0cea618203d6a80796a836c322330 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Wed, 19 Nov 2025 20:02:50 +0100
Subject: [PATCH 18/49] refactor: Don't expect a `config_file_path` attribute
on passed tool config
This makes us compatible with Zensical when running as a Markdown extension directly.
---
src/mkdocstrings_handlers/python/_internal/handler.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mkdocstrings_handlers/python/_internal/handler.py b/src/mkdocstrings_handlers/python/_internal/handler.py
index 5945455d..41ff1a00 100644
--- a/src/mkdocstrings_handlers/python/_internal/handler.py
+++ b/src/mkdocstrings_handlers/python/_internal/handler.py
@@ -434,7 +434,7 @@ def get_handler(
# We therefore increase the limit here, once, before Griffe is used to collect or render stuff.
sys.setrecursionlimit(max(sys.getrecursionlimit(), 2000))
- base_dir = Path(tool_config.config_file_path or "./mkdocs.yml").parent
+ base_dir = Path(getattr(tool_config, "config_file_path", None) or "./mkdocs.yml").parent
if "inventories" not in handler_config and "import" in handler_config:
warn("The 'import' key is renamed 'inventories' for the Python handler", FutureWarning, stacklevel=1)
handler_config["inventories"] = handler_config.pop("import", [])
From c10afdb98d590a23c8840c7c0cdd6c358094dc2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Thu, 27 Nov 2025 17:06:51 +0100
Subject: [PATCH 19/49] refactor: Remove deprecated code for v2
---
src/mkdocstrings_handlers/python/__init__.py | 4 -
.../python/_internal/handler.py | 47 +------
.../python/_internal/rendering.py | 125 ++----------------
src/mkdocstrings_handlers/python/config.py | 17 ---
src/mkdocstrings_handlers/python/handler.py | 17 ---
src/mkdocstrings_handlers/python/rendering.py | 17 ---
.../templates/material/_base/attribute.html | 10 --
.../material/_base/attribute.html.jinja | 6 +-
.../templates/material/_base/children.html | 10 --
.../templates/material/_base/class.html | 10 --
.../templates/material/_base/class.html.jinja | 24 ++--
.../templates/material/_base/docstring.html | 10 --
.../material/_base/docstring.html.jinja | 45 +++----
.../material/_base/docstring/admonition.html | 10 --
.../material/_base/docstring/attributes.html | 10 --
.../_base/docstring/attributes.html.jinja | 12 +-
.../material/_base/docstring/classes.html | 10 --
.../_base/docstring/classes.html.jinja | 3 +-
.../material/_base/docstring/examples.html | 10 --
.../_base/docstring/examples.html.jinja | 3 +-
.../material/_base/docstring/functions.html | 10 --
.../_base/docstring/functions.html.jinja | 3 +-
.../material/_base/docstring/modules.html | 10 --
.../_base/docstring/modules.html.jinja | 3 +-
.../_base/docstring/other_parameters.html | 10 --
.../docstring/other_parameters.html.jinja | 12 +-
.../material/_base/docstring/parameters.html | 10 --
.../_base/docstring/parameters.html.jinja | 21 +--
.../material/_base/docstring/raises.html | 10 --
.../_base/docstring/raises.html.jinja | 12 +-
.../material/_base/docstring/receives.html | 10 --
.../_base/docstring/receives.html.jinja | 15 +--
.../material/_base/docstring/returns.html | 10 --
.../_base/docstring/returns.html.jinja | 15 +--
.../_base/docstring/type_aliases.html | 10 --
.../_base/docstring/type_aliases.html.jinja | 2 +-
.../_base/docstring/type_parameters.html | 10 --
.../docstring/type_parameters.html.jinja | 18 +--
.../material/_base/docstring/warns.html | 10 --
.../material/_base/docstring/warns.html.jinja | 12 +-
.../material/_base/docstring/yields.html | 10 --
.../_base/docstring/yields.html.jinja | 15 +--
.../templates/material/_base/expression.html | 10 --
.../templates/material/_base/function.html | 10 --
.../material/_base/function.html.jinja | 14 +-
.../templates/material/_base/labels.html | 10 --
.../templates/material/_base/language.html | 10 --
.../material/_base/language.html.jinja | 9 +-
.../material/_base/languages/en.html | 10 --
.../material/_base/languages/ja.html | 10 --
.../material/_base/languages/zh.html | 10 --
.../templates/material/_base/module.html | 10 --
.../material/_base/module.html.jinja | 12 +-
.../templates/material/_base/signature.html | 10 --
.../material/_base/signature.html.jinja | 9 +-
.../templates/material/_base/summary.html | 10 --
.../material/_base/summary.html.jinja | 15 +--
.../material/_base/summary/attributes.html | 10 --
.../_base/summary/attributes.html.jinja | 3 +-
.../material/_base/summary/classes.html | 10 --
.../material/_base/summary/classes.html.jinja | 3 +-
.../material/_base/summary/functions.html | 10 --
.../_base/summary/functions.html.jinja | 3 +-
.../material/_base/summary/modules.html | 10 --
.../material/_base/summary/modules.html.jinja | 3 +-
.../material/_base/summary/type_aliases.html | 10 --
.../_base/summary/type_aliases.html.jinja | 3 +-
.../templates/material/_base/type_alias.html | 10 --
.../material/_base/type_alias.html.jinja | 9 +-
.../material/_base/type_parameters.html | 10 --
.../material/_base/type_parameters.html.jinja | 6 +-
.../python/templates/material/attribute.html | 2 -
.../python/templates/material/children.html | 2 -
.../python/templates/material/class.html | 2 -
.../python/templates/material/docstring.html | 2 -
.../material/docstring/admonition.html | 2 -
.../material/docstring/attributes.html | 2 -
.../templates/material/docstring/classes.html | 2 -
.../material/docstring/examples.html | 2 -
.../material/docstring/functions.html | 2 -
.../templates/material/docstring/modules.html | 2 -
.../material/docstring/other_parameters.html | 2 -
.../material/docstring/parameters.html | 2 -
.../templates/material/docstring/raises.html | 2 -
.../material/docstring/receives.html | 2 -
.../templates/material/docstring/returns.html | 2 -
.../templates/material/docstring/warns.html | 2 -
.../templates/material/docstring/yields.html | 2 -
.../python/templates/material/expression.html | 2 -
.../python/templates/material/function.html | 2 -
.../python/templates/material/labels.html | 2 -
.../python/templates/material/language.html | 2 -
.../templates/material/languages/en.html | 2 -
.../templates/material/languages/ja.html | 2 -
.../templates/material/languages/zh.html | 2 -
.../python/templates/material/module.html | 2 -
.../python/templates/material/signature.html | 2 -
.../python/templates/material/summary.html | 2 -
.../material/summary/attributes.html | 2 -
.../templates/material/summary/classes.html | 2 -
.../templates/material/summary/functions.html | 2 -
.../templates/material/summary/modules.html | 2 -
.../readthedocs/_base/class.html.jinja | 36 ++---
.../_base/docstring/attributes.html | 10 --
.../_base/docstring/attributes.html.jinja | 6 +-
.../_base/docstring/other_parameters.html | 10 --
.../docstring/other_parameters.html.jinja | 6 +-
.../_base/docstring/parameters.html | 10 --
.../_base/docstring/parameters.html.jinja | 9 +-
.../readthedocs/_base/docstring/raises.html | 10 --
.../_base/docstring/raises.html.jinja | 6 +-
.../readthedocs/_base/docstring/receives.html | 10 --
.../_base/docstring/receives.html.jinja | 6 +-
.../readthedocs/_base/docstring/returns.html | 10 --
.../_base/docstring/returns.html.jinja | 6 +-
.../readthedocs/_base/docstring/warns.html | 10 --
.../_base/docstring/warns.html.jinja | 6 +-
.../readthedocs/_base/docstring/yields.html | 10 --
.../_base/docstring/yields.html.jinja | 6 +-
.../templates/readthedocs/_base/language.html | 10 --
.../readthedocs/_base/language.html.jinja | 9 +-
.../readthedocs/_base/languages/en.html | 10 --
.../readthedocs/_base/languages/ja.html | 10 --
.../readthedocs/_base/languages/zh.html | 10 --
.../readthedocs/docstring/attributes.html | 2 -
.../docstring/other_parameters.html | 2 -
.../readthedocs/docstring/parameters.html | 2 -
.../readthedocs/docstring/raises.html | 2 -
.../readthedocs/docstring/receives.html | 2 -
.../readthedocs/docstring/returns.html | 2 -
.../readthedocs/docstring/warns.html | 2 -
.../readthedocs/docstring/yields.html | 2 -
.../templates/readthedocs/language.html | 2 -
.../templates/readthedocs/languages/en.html | 2 -
.../templates/readthedocs/languages/ja.html | 2 -
.../templates/readthedocs/languages/zh.html | 2 -
tests/test_api.py | 4 -
tests/test_handler.py | 2 +
tests/test_themes.py | 10 +-
139 files changed, 168 insertions(+), 1047 deletions(-)
delete mode 100644 src/mkdocstrings_handlers/python/config.py
delete mode 100644 src/mkdocstrings_handlers/python/handler.py
delete mode 100644 src/mkdocstrings_handlers/python/rendering.py
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/attribute.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/children.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/class.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/expression.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/function.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/labels.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/language.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/module.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/signature.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/summary/type_aliases.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/type_alias.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/_base/type_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/attribute.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/children.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/class.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/classes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/examples.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/functions.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/modules.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/raises.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/receives.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/returns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/warns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/yields.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/expression.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/function.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/labels.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/language.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/languages/en.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/languages/ja.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/languages/zh.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/module.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/signature.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/summary.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/summary/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/summary/classes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/summary/functions.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/material/summary/modules.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/language.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html
delete mode 100644 src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html
diff --git a/src/mkdocstrings_handlers/python/__init__.py b/src/mkdocstrings_handlers/python/__init__.py
index 7e12fa73..dbad0355 100644
--- a/src/mkdocstrings_handlers/python/__init__.py
+++ b/src/mkdocstrings_handlers/python/__init__.py
@@ -24,14 +24,12 @@
do_as_modules_section,
do_as_type_aliases_section,
do_backlink_tree,
- do_crossref,
do_filter_objects,
do_format_attribute,
do_format_code,
do_format_signature,
do_format_type_alias,
do_get_template,
- do_multi_crossref,
do_order_members,
do_split_path,
do_stash_crossref,
@@ -59,14 +57,12 @@
"do_as_modules_section",
"do_as_type_aliases_section",
"do_backlink_tree",
- "do_crossref",
"do_filter_objects",
"do_format_attribute",
"do_format_code",
"do_format_signature",
"do_format_type_alias",
"do_get_template",
- "do_multi_crossref",
"do_order_members",
"do_split_path",
"do_stash_crossref",
diff --git a/src/mkdocstrings_handlers/python/_internal/handler.py b/src/mkdocstrings_handlers/python/_internal/handler.py
index 41ff1a00..abab532c 100644
--- a/src/mkdocstrings_handlers/python/_internal/handler.py
+++ b/src/mkdocstrings_handlers/python/_internal/handler.py
@@ -10,7 +10,6 @@
from dataclasses import asdict
from pathlib import Path
from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar
-from warnings import warn
from griffe import (
AliasResolutionError,
@@ -56,17 +55,6 @@ def chdir(path: str) -> Iterator[None]:
patch_loggers(get_logger)
-# YORE: Bump 2: Remove block.
-def _warn_extra_options(names: Sequence[str]) -> None:
- warn(
- "Passing extra options directly under `options` is deprecated. "
- "Instead, pass them under `options.extra`, and update your templates. "
- f"Current extra (unrecognized) options: {', '.join(sorted(names))}",
- DeprecationWarning,
- stacklevel=3,
- )
-
-
class PythonHandler(BaseHandler):
"""The Python handler class."""
@@ -97,18 +85,9 @@ def __init__(self, config: PythonConfig, base_dir: Path, **kwargs: Any) -> None:
self.base_dir = base_dir
"""The base directory of the project."""
- # YORE: Bump 2: Remove block.
- global_extra, global_options = PythonOptions._extract_extra(config.options)
- if global_extra:
- _warn_extra_options(global_extra.keys()) # type: ignore[arg-type]
- self._global_extra = global_extra
- self.global_options = global_options
+ self.global_options = config.options
"""The global configuration options (in `mkdocs.yml`)."""
- # YORE: Bump 2: Replace `# ` with `` within block.
- # self.global_options = config.options
- # """The global configuration options (in `mkdocs.yml`)."""
-
# Warn if user overrides base templates.
if self.custom_templates:
for theme_dir in base_dir.joinpath(self.custom_templates, "python").iterdir():
@@ -188,25 +167,13 @@ def get_options(self, local_options: Mapping[str, Any]) -> HandlerOptions:
Returns:
The combined options.
"""
- # YORE: Bump 2: Remove block.
- local_extra, local_options = PythonOptions._extract_extra(local_options) # type: ignore[arg-type]
- if local_extra:
- _warn_extra_options(local_extra.keys()) # type: ignore[arg-type]
- unknown_extra = self._global_extra | local_extra
-
extra = {**self.global_options.get("extra", {}), **local_options.get("extra", {})}
options = {**self.global_options, **local_options, "extra": extra}
try:
- # YORE: Bump 2: Replace `opts =` with `return` within line.
- opts = PythonOptions.from_data(**options)
+ return PythonOptions.from_data(**options)
except Exception as error:
raise PluginError(f"Invalid options: {error}") from error
- # YORE: Bump 2: Remove block.
- for key, value in unknown_extra.items():
- object.__setattr__(opts, key, value)
- return opts
-
def collect(self, identifier: str, options: PythonOptions) -> CollectorItem:
"""Collect the documentation for the given identifier.
@@ -291,7 +258,7 @@ def render(self, data: CollectorItem, options: PythonOptions, locale: str | None
Returns:
The rendered data (HTML).
"""
- template_name = rendering.do_get_template(self.env, data)
+ template_name = rendering.do_get_template(data)
template = self.env.get_template(template_name)
return template.render(
@@ -303,8 +270,7 @@ def render(self, data: CollectorItem, options: PythonOptions, locale: str | None
# than as an item in a dictionary.
"heading_level": options.heading_level,
"root": True,
- # YORE: Bump 2: Regex-replace ` or .+` with ` or "en",` within line.
- "locale": locale or self.config.locale,
+ "locale": locale or "en",
},
)
@@ -336,8 +302,6 @@ def update_env(self, config: Any) -> None: # noqa: ARG002
self.env.lstrip_blocks = True
self.env.keep_trailing_newline = False
self.env.filters["split_path"] = rendering.do_split_path
- self.env.filters["crossref"] = rendering.do_crossref
- self.env.filters["multi_crossref"] = rendering.do_multi_crossref
self.env.filters["order_members"] = rendering.do_order_members
self.env.filters["format_code"] = rendering.do_format_code
self.env.filters["format_signature"] = rendering.do_format_signature
@@ -435,9 +399,6 @@ def get_handler(
sys.setrecursionlimit(max(sys.getrecursionlimit(), 2000))
base_dir = Path(getattr(tool_config, "config_file_path", None) or "./mkdocs.yml").parent
- if "inventories" not in handler_config and "import" in handler_config:
- warn("The 'import' key is renamed 'inventories' for the Python handler", FutureWarning, stacklevel=1)
- handler_config["inventories"] = handler_config.pop("import", [])
return PythonHandler(
config=PythonConfig.from_data(**handler_config),
base_dir=base_dir,
diff --git a/src/mkdocstrings_handlers/python/_internal/rendering.py b/src/mkdocstrings_handlers/python/_internal/rendering.py
index ba51fcac..20ae7c54 100644
--- a/src/mkdocstrings_handlers/python/_internal/rendering.py
+++ b/src/mkdocstrings_handlers/python/_internal/rendering.py
@@ -7,13 +7,11 @@
import string
import subprocess
import sys
-import warnings
from collections import defaultdict
from contextlib import suppress
from dataclasses import replace
from functools import lru_cache
-from pathlib import Path
-from re import Match, Pattern
+from re import Pattern
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Literal, TypeVar
from griffe import (
@@ -33,7 +31,7 @@
Object,
TypeAlias,
)
-from jinja2 import TemplateNotFound, pass_context, pass_environment
+from jinja2 import pass_context
from markupsafe import Markup
from mkdocs_autorefs import AutorefsHookInterface, Backlink, BacklinkCrumb
from mkdocstrings import get_logger
@@ -42,7 +40,6 @@
from collections.abc import Iterable, Iterator, Sequence
from griffe import Attribute, Class, Function, Module
- from jinja2 import Environment
from jinja2.runtime import Context
from mkdocstrings import CollectorItem
@@ -170,10 +167,8 @@ def do_format_signature(
The same code, formatted.
"""
env = context.environment
- # YORE: Bump 2: Replace `do_get_template(env, "type_parameters")` with `"type_parameters.html.jinja"` within line.
- type_params_template = env.get_template(do_get_template(env, "type_parameters"))
- # YORE: Bump 2: Replace `do_get_template(env, "signature")` with `"signature.html.jinja"` within line.
- signature_template = env.get_template(do_get_template(env, "signature"))
+ type_params_template = env.get_template("type_parameters.html.jinja")
+ signature_template = env.get_template("signature.html.jinja")
if annotations is None:
new_context = context.parent
@@ -237,8 +232,7 @@ def do_format_attribute(
The same code, formatted.
"""
env = context.environment
- # YORE: Bump 2: Replace `do_get_template(env, "expression")` with `"expression.html.jinja"` within line.
- template = env.get_template(do_get_template(env, "expression"))
+ template = env.get_template("expression.html.jinja")
annotations = context.parent["config"].show_signature_annotations
signature = str(attribute_path).strip()
@@ -295,10 +289,8 @@ def do_format_type_alias(
The same code, formatted.
"""
env = context.environment
- # YORE: Bump 2: Replace `do_get_template(env, "type_parameters")` with `"type_parameters.html.jinja"` within line.
- type_params_template = env.get_template(do_get_template(env, "type_parameters"))
- # YORE: Bump 2: Replace `do_get_template(env, "expression")` with `"expression.html.jinja"` within line.
- expr_template = env.get_template(do_get_template(env, "expression"))
+ type_params_template = env.get_template("type_parameters.html.jinja")
+ expr_template = env.get_template("expression.html.jinja")
signature = str(type_alias_path).strip()
signature += type_params_template.render(context.parent, obj=type_alias, signature=True)
@@ -364,76 +356,6 @@ def do_order_members(
return members
-# YORE: Bump 2: Remove block.
-@lru_cache
-def _warn_crossref() -> None:
- warnings.warn(
- "The `crossref` filter is deprecated and will be removed in a future version",
- DeprecationWarning,
- stacklevel=1,
- )
-
-
-# YORE: Bump 2: Remove block.
-def do_crossref(path: str, *, brief: bool = True) -> Markup:
- """Deprecated. Filter to create cross-references.
-
- Parameters:
- path: The path to link to.
- brief: Show only the last part of the path, add full path as hover.
-
- Returns:
- Markup text.
- """
- _warn_crossref()
- full_path = path
- if brief:
- path = full_path.split(".")[-1]
- return Markup("{path}").format(
- full_path=full_path,
- path=path,
- )
-
-
-# YORE: Bump 2: Remove block.
-@lru_cache
-def _warn_multi_crossref() -> None:
- warnings.warn(
- "The `multi_crossref` filter is deprecated and will be removed in a future version",
- DeprecationWarning,
- stacklevel=1,
- )
-
-
-# YORE: Bump 2: Remove block.
-def do_multi_crossref(text: str, *, code: bool = True) -> Markup:
- """Deprecated. Filter to create cross-references.
-
- Parameters:
- text: The text to scan.
- code: Whether to wrap the result in a code tag.
-
- Returns:
- Markup text.
- """
- _warn_multi_crossref()
- group_number = 0
- variables = {}
-
- def repl(match: Match) -> str:
- nonlocal group_number
- group_number += 1
- path = match.group()
- path_var = f"path{group_number}"
- variables[path_var] = path
- return f"{{{path_var}}}"
-
- text = re.sub(r"([\w.]+)", repl, text)
- if code:
- text = f"{text}"
- return Markup(text).format(**variables) # noqa: S704
-
-
_split_path_re = re.compile(r"([.(]?)([\w]+)(\))?")
_splitable_re = re.compile(r"[().]")
@@ -648,39 +570,20 @@ def formatter(code: str, line_length: int) -> str:
return formatter
-# YORE: Bump 2: Remove line.
-@pass_environment
-# YORE: Bump 2: Replace `env: Environment, ` with `` within line.
-# YORE: Bump 2: Replace `str | ` with `` within line.
-def do_get_template(env: Environment, obj: str | Object) -> str:
+def do_get_template(obj: Object | Alias) -> str:
"""Get the template name used to render an object.
Parameters:
- env: The Jinja environment, passed automatically.
- obj: A Griffe object, or a template name.
+ obj: A Griffe object.
Returns:
A template name.
"""
- name = obj
- if isinstance(obj, (Alias, Object)):
- extra_data = getattr(obj, "extra", {}).get("mkdocstrings", {})
- if name := extra_data.get("template", ""):
- return name
- name = obj.kind.value.replace(" ", "_")
- # YORE: Bump 2: Replace block with `return f"{name}.html.jinja"`.
- try:
- template = env.get_template(f"{name}.html")
- except TemplateNotFound:
- return f"{name}.html.jinja"
- our_template = Path(template.filename).is_relative_to(Path(__file__).parent.parent) # type: ignore[arg-type]
- if our_template:
- return f"{name}.html.jinja"
- _logger.warning(
- f"DeprecationWarning: Overriding '{name}.html' is deprecated, override '{name}.html.jinja' instead. ",
- once=True,
- )
- return f"{name}.html"
+ extra_data = getattr(obj, "extra", {}).get("mkdocstrings", {})
+ if name := extra_data.get("template", ""):
+ return name
+ name = obj.kind.value.replace(" ", "_")
+ return f"{name}.html.jinja"
@pass_context
diff --git a/src/mkdocstrings_handlers/python/config.py b/src/mkdocstrings_handlers/python/config.py
deleted file mode 100644
index 5edab089..00000000
--- a/src/mkdocstrings_handlers/python/config.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""Deprecated. Import from `mkdocstrings_handlers.python` directly."""
-
-# YORE: Bump 2: Remove file.
-
-import warnings
-from typing import Any
-
-from mkdocstrings_handlers.python._internal import config
-
-
-def __getattr__(name: str) -> Any:
- warnings.warn(
- "Importing from `mkdocstrings_handlers.python.config` is deprecated. Import from `mkdocstrings_handlers.python` directly.",
- DeprecationWarning,
- stacklevel=2,
- )
- return getattr(config, name)
diff --git a/src/mkdocstrings_handlers/python/handler.py b/src/mkdocstrings_handlers/python/handler.py
deleted file mode 100644
index 5b334860..00000000
--- a/src/mkdocstrings_handlers/python/handler.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""Deprecated. Import from `mkdocstrings_handlers.python` directly."""
-
-# YORE: Bump 2: Remove file.
-
-import warnings
-from typing import Any
-
-from mkdocstrings_handlers.python._internal import handler
-
-
-def __getattr__(name: str) -> Any:
- warnings.warn(
- "Importing from `mkdocstrings_handlers.python.handler` is deprecated. Import from `mkdocstrings_handlers.python` directly.",
- DeprecationWarning,
- stacklevel=2,
- )
- return getattr(handler, name)
diff --git a/src/mkdocstrings_handlers/python/rendering.py b/src/mkdocstrings_handlers/python/rendering.py
deleted file mode 100644
index 5cd4d200..00000000
--- a/src/mkdocstrings_handlers/python/rendering.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""Deprecated. Import from `mkdocstrings_handlers.python` directly."""
-
-# YORE: Bump 2: Remove file.
-
-import warnings
-from typing import Any
-
-from mkdocstrings_handlers.python._internal import rendering
-
-
-def __getattr__(name: str) -> Any:
- warnings.warn(
- "Importing from `mkdocstrings_handlers.python.rendering` is deprecated. Import from `mkdocstrings_handlers.python` directly.",
- DeprecationWarning,
- stacklevel=2,
- )
- return getattr(rendering, name)
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html
deleted file mode 100644
index 37c8702c..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/attribute.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/attribute.html' is deprecated, extend '_base/attribute.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
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 bad9ad54..65054689 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja
@@ -67,8 +67,7 @@ Context:
This block renders the labels for the attribute.
-#}
{% with labels = attribute.labels %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "labels"|get_template with context %}
+ {% include "labels.html.jinja" with context %}
{% endwith %}
{% endblock labels %}
@@ -115,8 +114,7 @@ Context:
This block renders the docstring for the attribute.
-#}
{% with docstring_sections = attribute.docstring.parsed %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% endblock docstring %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/children.html b/src/mkdocstrings_handlers/python/templates/material/_base/children.html
deleted file mode 100644
index eada68e8..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/children.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/children.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/children.html' is deprecated, extend '_base/children.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html b/src/mkdocstrings_handlers/python/templates/material/_base/class.html
deleted file mode 100644
index 0fb87f5b..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/class.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/class.html' is deprecated, extend '_base/class.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja
index 417afe41..43ec5b1a 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja
@@ -57,11 +57,9 @@ Context:
{%+ filter highlight(language="python", inline=True) %}
{{ class_name -}}
{%- with obj = function -%}
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
- {%- include "type_parameters"|get_template with context -%}
+ {%- include "type_parameters.html.jinja" with context -%}
{%- endwith -%}
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
- {%- include "signature"|get_template with context -%}
+ {%- include "signature.html.jinja" with context -%}
{% endfilter %}
{% endwith %}
{% else %}
@@ -76,8 +74,7 @@ Context:
This block renders the labels for the class.
-#}
{% with labels = class.labels %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "labels"|get_template with context %}
+ {% include "labels.html.jinja" with context %}
{% endwith %}
{% endblock labels %}
@@ -148,8 +145,7 @@ Context:
Bases: {% for expression in class.bases -%}
{%- with backlink_type = "subclassed-by" -%}
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. -#}
- {%- include "expression"|get_template with context -%}
+ {%- include "expression.html.jinja" with context -%}
{%- endwith -%}
{% if not loop.last %}, {% endif %}
{% endfor -%}
@@ -211,8 +207,7 @@ Context:
This block renders the docstring for the class.
-#}
{% with docstring_sections = class.docstring.parsed %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% if config.merge_init_into_class %}
{# We don't want to merge the inherited `__init__` method docstring into the class docstring #}
@@ -221,8 +216,7 @@ Context:
{% if "__init__" in check_members and check_members["__init__"].has_docstring %}
{% with function = check_members["__init__"] %}
{% with obj = function, docstring_sections = function.docstring.parsed %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% endwith %}
{% endif %}
@@ -239,8 +233,7 @@ Context:
This block renders auto-summaries for classes, methods, and attributes.
-#}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "summary"|get_template with context %}
+ {% include "summary.html.jinja" with context %}
{% endblock summary %}
{% block source scoped %}
@@ -286,8 +279,7 @@ Context:
-#}
{% set root = False %}
{% set heading_level = heading_level + 1 %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "children"|get_template with context %}
+ {% include "children.html.jinja" with context %}
{% endblock children %}
{% endblock contents %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html
deleted file mode 100644
index c487550b..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring.html' is deprecated, extend '_base/docstring.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja
index cae4f50f..a00a0249 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja
@@ -24,50 +24,35 @@ Context:
{% if config.show_docstring_description and section.kind.value == "text" %}
{{ section.value|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
{% elif config.show_docstring_attributes and section.kind.value == "attributes" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/attributes"|get_template with context %}
+ {% include "docstring/attributes.html.jinja" with context %}
{% elif config.show_docstring_functions and section.kind.value == "functions" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/functions"|get_template with context %}
+ {% include "docstring/functions.html.jinja" with context %}
{% elif config.show_docstring_classes and section.kind.value == "classes" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/classes"|get_template with context %}
+ {% include "docstring/classes.html.jinja" with context %}
{% elif config.show_docstring_type_aliases and section.kind.value == "type aliases" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/type_aliases"|get_template with context %}
+ {% include "docstring/type_aliases.html.jinja" with context %}
{% elif config.show_docstring_modules and section.kind.value == "modules" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/modules"|get_template with context %}
+ {% include "docstring/modules.html.jinja" with context %}
{% elif config.show_docstring_type_parameters and section.kind.value == "type parameters" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/type_parameters"|get_template with context %}
+ {% include "docstring/type_parameters.html.jinja" with context %}
{% elif config.show_docstring_parameters and section.kind.value == "parameters" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/parameters"|get_template with context %}
+ {% include "docstring/parameters.html.jinja" with context %}
{% elif config.show_docstring_other_parameters and section.kind.value == "other parameters" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/other_parameters"|get_template with context %}
+ {% include "docstring/other_parameters.html.jinja" with context %}
{% elif config.show_docstring_raises and section.kind.value == "raises" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/raises"|get_template with context %}
+ {% include "docstring/raises.html.jinja" with context %}
{% elif config.show_docstring_warns and section.kind.value == "warns" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/warns"|get_template with context %}
+ {% include "docstring/warns.html.jinja" with context %}
{% elif config.show_docstring_yields and section.kind.value == "yields" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/yields"|get_template with context %}
+ {% include "docstring/yields.html.jinja" with context %}
{% elif config.show_docstring_receives and section.kind.value == "receives" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/receives"|get_template with context %}
+ {% include "docstring/receives.html.jinja" with context %}
{% elif config.show_docstring_returns and section.kind.value == "returns" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/returns"|get_template with context %}
+ {% include "docstring/returns.html.jinja" with context %}
{% elif config.show_docstring_examples and section.kind.value == "examples" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/examples"|get_template with context %}
+ {% include "docstring/examples.html.jinja" with context %}
{% elif config.show_docstring_description and section.kind.value == "admonition" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring/admonition"|get_template with context %}
+ {% include "docstring/admonition.html.jinja" with context %}
{% endif %}
{% endfor %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html
deleted file mode 100644
index e94d6e61..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/admonition.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/admonition.html' is deprecated, extend '_base/docstring/admonition.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html
deleted file mode 100644
index 9f2abcd1..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/attributes.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/attributes.html' is deprecated, extend '_base/docstring/attributes.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja
index 03104333..9e0add3f 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering attributes section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -38,8 +37,7 @@ Context:
{% if attribute.annotation %}
{% with expression = attribute.annotation %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -63,8 +61,7 @@ Context:
{{ attribute.name }}
{% if attribute.annotation %}
{% with expression = attribute.annotation %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %})
+ ({% include "expression.html.jinja" with context %})
{% endwith %}
{% endif %}
–
@@ -98,8 +95,7 @@ Context:
TYPE:
{% with expression = attribute.annotation %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html
deleted file mode 100644
index 9c04b145..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/classes.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/classes.html' is deprecated, extend '_base/docstring/classes.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja
index 09a5b758..b139a761 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering classes section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html
deleted file mode 100644
index 4f66600f..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/examples.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/examples.html' is deprecated, extend '_base/docstring/examples.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja
index 09293cfb..32360f7d 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering examples section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{{ section.title or lang.t("Examples:") }}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html
deleted file mode 100644
index 906658b4..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/functions.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/functions.html' is deprecated, extend '_base/docstring/functions.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja
index dd33984f..afec8f60 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering functions section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html
deleted file mode 100644
index 7b0dcc51..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/modules.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/modules.html' is deprecated, extend '_base/docstring/modules.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja
index 106e6bf6..5556cf15 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering modules section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html
deleted file mode 100644
index 02261331..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/other_parameters.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/other_parameters.html' is deprecated, extend '_base/docstring/other_parameters.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja
index 66940069..5e0a75f5 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering other parameters section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -38,8 +37,7 @@ Context:
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -63,8 +61,7 @@ Context:
{{ parameter.name }}
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %})
+ ({% include "expression.html.jinja" with context %})
{% endwith %}
{% endif %}
–
@@ -98,8 +95,7 @@ Context:
{{ lang.t("TYPE:") }}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html
deleted file mode 100644
index f5292150..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/parameters.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/parameters.html' is deprecated, extend '_base/docstring/parameters.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja
index a3ea5f7f..a67113fa 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering parameters section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -54,8 +53,7 @@ Context:
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -67,8 +65,7 @@ Context:
{% if parameter.default %}
{% with expression = parameter.default, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% else %}
{{ lang.t("required") }}
@@ -102,12 +99,10 @@ Context:
{% endif %}
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %}
+ ({% include "expression.html.jinja" with context %}
{%- if parameter.default %}, {{ lang.t("default:") }}
{% with expression = parameter.default, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %})
{% endwith %}
@@ -158,8 +153,7 @@ Context:
{{ lang.t("TYPE:") }}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -167,8 +161,7 @@ Context:
{{ lang.t("DEFAULT:") }}
{% with expression = parameter.default, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html
deleted file mode 100644
index 38a21e89..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/raises.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/raises.html' is deprecated, extend '_base/docstring/raises.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja
index cd034c0e..7d548035 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering raises section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -36,8 +35,7 @@ Context:
{% if raises.annotation %}
{% with expression = raises.annotation, backlink_type = "raised-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -60,8 +58,7 @@ Context:
{% if raises.annotation %}
{% with expression = raises.annotation, backlink_type = "raised-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
–
{% endif %}
@@ -88,8 +85,7 @@ Context:
{% with expression = raises.annotation, backlink_type = "raised-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html
deleted file mode 100644
index d9c404b6..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/receives.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/receives.html' is deprecated, extend '_base/docstring/receives.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja
index 3ecc5b41..6830d434 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering receives section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -39,8 +38,7 @@ Context:
{% if receives.annotation %}
{% with expression = receives.annotation, backlink_type = "received-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -65,8 +63,7 @@ Context:
{% if receives.annotation %}
{% with expression = receives.annotation, backlink_type = "received-by" %}
{% if receives.name %} ({% endif %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% if receives.name %}){% endif %}
{% endwith %}
{% endif %}
@@ -97,8 +94,7 @@ Context:
{% elif receives.annotation %}
{% with expression = receives.annotation, backlink_type = "received-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -112,8 +108,7 @@ Context:
{{ lang.t("TYPE:") }}
{% with expression = receives.annotation, backlink_type = "received-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html
deleted file mode 100644
index b608af5f..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/returns.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/returns.html' is deprecated, extend '_base/docstring/returns.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja
index bc8ee4ff..da693da7 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering returns section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -39,8 +38,7 @@ Context:
{% if returns.annotation %}
{% with expression = returns.annotation, backlink_type = "returned-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -65,8 +63,7 @@ Context:
{% if returns.annotation %}
{% with expression = returns.annotation, backlink_type = "returned-by" %}
{% if returns.name %} ({% endif %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% if returns.name %}){% endif %}
{% endwith %}
{% endif %}
@@ -97,8 +94,7 @@ Context:
{% elif returns.annotation %}
{% with expression = returns.annotation, backlink_type = "returned-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -112,8 +108,7 @@ Context:
{{ lang.t("TYPE:") }}
{% with expression = returns.annotation, backlink_type = "returned-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html
deleted file mode 100644
index e9a99d1b..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/type_aliases.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/type_aliases.html' is deprecated, extend '_base/docstring/type_aliases.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja
index ceaa520c..e1c87754 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_aliases.html.jinja
@@ -15,7 +15,7 @@ Context:
{{ log.debug("Rendering type aliases section") }}
{% endblock logs %}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html
deleted file mode 100644
index 90a1af38..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/type_parameters.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/type_parameters.html' is deprecated, extend '_base/docstring/type_parameters.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja
index 8e83e8be..6fe8bb4e 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/type_parameters.html.jinja
@@ -15,7 +15,7 @@ Context:
{{ log.debug("Rendering type parameters section") }}
{% endblock logs %}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -56,7 +56,7 @@ Context:
{% if type_parameter.annotation %}
{% with expression = type_parameter.annotation %}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -68,7 +68,7 @@ Context:
{% if type_parameter.default %}
{% with expression = type_parameter.default %}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% else %}
{{ lang.t("required") }}
@@ -108,12 +108,12 @@ Context:
{%- endif -%}
{%- if type_parameter.bound -%}
{%- with expression = type_parameter.bound -%}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{%- endwith -%}
{%- if type_parameter.default %}, {% endif -%}
{%- elif type_parameter.constraints -%}
{%- for expression in type_parameter.constraints -%}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{%- if not loop.last %}, {% endif -%}
{%- endfor -%}
{%- if type_parameter.default %}, {% endif -%}
@@ -121,7 +121,7 @@ Context:
{%- if type_parameter.default -%}
{{ lang.t("default:") }}
{% with expression = type_parameter.default %}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{%- endwith -%}
{%- endif -%}
{%- if type_parameter.constraints or type_parameter.default -%}
@@ -177,7 +177,7 @@ Context:
{{ lang.t("CONSTRAINTS:") }}
{% for constraint in type_parameter.constraints -%}
{%- with expression = constraint -%}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{%- endwith -%}
{%- if not loop.last %}, {% endif -%}
{% endfor %}
@@ -186,7 +186,7 @@ Context:
{{ lang.t("BOUND:") }}
{% with expression = type_parameter.bound %}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -194,7 +194,7 @@ Context:
{{ lang.t("DEFAULT:") }}
{% with expression = type_parameter.default %}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html
deleted file mode 100644
index 9eba72ab..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/warns.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/warns.html' is deprecated, extend '_base/docstring/warns.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja
index d5a24262..6f7e69de 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering warns section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -36,8 +35,7 @@ Context:
{% if warns.annotation %}
{% with expression = warns.annotation, backlink_type = "emitted-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -60,8 +58,7 @@ Context:
{% if warns.annotation %}
{% with expression = warns.annotation, backlink_type = "emitted-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
–
{% endif %}
@@ -88,8 +85,7 @@ Context:
{% with expression = warns.annotation, backlink_type = "emitted-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html
deleted file mode 100644
index 6ec31dd0..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/yields.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/yields.html' is deprecated, extend '_base/docstring/yields.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja
index 154d0202..69e5ea6d 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug("Rendering yields section") }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
{% if config.docstring_section_style == "table" %}
@@ -39,8 +38,7 @@ Context:
{% if yields.annotation %}
{% with expression = yields.annotation, backlink_type = "yielded-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -65,8 +63,7 @@ Context:
{% if yields.annotation %}
{% with expression = yields.annotation, backlink_type = "yielded-by" %}
{% if yields.name %} ({% endif %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% if yields.name %}){% endif %}
{% endwith %}
{% endif %}
@@ -97,8 +94,7 @@ Context:
{% elif yields.annotation %}
{% with expression = yields.annotation, backlink_type = "yielded-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
@@ -112,8 +108,7 @@ Context:
{{ lang.t("TYPE:") }}:
{% with expression = yields.annotation, backlink_type = "yielded-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html
deleted file mode 100644
index 8c84928c..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/expression.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/expression.html' is deprecated, extend '_base/expression.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/function.html b/src/mkdocstrings_handlers/python/templates/material/_base/function.html
deleted file mode 100644
index 4afd930b..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/function.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/function.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/function.html' is deprecated, extend '_base/function.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja
index f296c214..3cfc7f30 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja
@@ -17,8 +17,7 @@ Context:
{{ log.debug("Rendering " + function.path) }}
{% endblock logs %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -62,9 +61,8 @@ Context:
{% else %}
{%+ filter highlight(language="python", inline=True) -%}
{{ function_name }}
- {#- YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within block. -#}
- {%- include "type_parameters"|get_template with context -%}
- {%- include "signature"|get_template with context -%}
+ {%- include "type_parameters.html.jinja" with context -%}
+ {%- include "signature.html.jinja" with context -%}
{%- endfilter %}
{% endif %}
{% endblock heading %}
@@ -75,8 +73,7 @@ Context:
This block renders the labels for the function.
-#}
{% with labels = function.labels %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "labels"|get_template with context %}
+ {% include "labels.html.jinja" with context %}
{% endwith %}
{% endblock labels %}
@@ -134,8 +131,7 @@ Context:
This block renders the docstring for the function.
-#}
{% with docstring_sections = function.docstring.parsed %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% endblock docstring %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html
deleted file mode 100644
index cda79114..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/labels.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/labels.html' is deprecated, extend '_base/labels.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/language.html b/src/mkdocstrings_handlers/python/templates/material/_base/language.html
deleted file mode 100644
index a5a86545..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/language.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/language.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/language.html' is deprecated, extend '_base/language.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja
index 5a4b773e..31ecfdd6 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja
@@ -7,15 +7,12 @@
-#}
{% endblock logs %}
-{# YORE: Bump 2: Replace `| get_template` with `~ ".html.jinja"` within line. #}
-{% set lang_pth = "languages/" ~ locale | get_template %}
+{% set lang_pth = "languages/" ~ locale ~ ".html.jinja" %}
{% if lang_pth is existing_template %}
{% import lang_pth as lang %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% import "languages/en"|get_template as fallback %}
+ {% import "languages/en.html.jinja" as fallback %}
{% macro t(key) %}{{ lang.t(key) or fallback.t(key) }}{% endmacro %}
{% else %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% import "languages/en"|get_template as lang %}
+ {% import "languages/en.html.jinja" as lang %}
{% macro t(key) %}{{ lang.t(key) }}{% endmacro %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html b/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html
deleted file mode 100644
index 2f050a32..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/languages/en.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/languages/en.html' is deprecated, extend '_base/languages/en.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html b/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html
deleted file mode 100644
index 1f3095f4..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/languages/ja.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/languages/ja.html' is deprecated, extend '_base/languages/ja.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html b/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html
deleted file mode 100644
index b58b0479..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/languages/zh.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/languages/zh.html' is deprecated, extend '_base/languages/zh.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/module.html b/src/mkdocstrings_handlers/python/templates/material/_base/module.html
deleted file mode 100644
index dcda15ea..00000000
--- a/src/mkdocstrings_handlers/python/templates/material/_base/module.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/module.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/module.html' is deprecated, extend '_base/module.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja
index c5e4a400..c0f4a7cb 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja
@@ -63,8 +63,7 @@ Context:
This block renders the labels for the module.
-#}
{% with labels = module.labels %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "labels"|get_template with context %}
+ {% include "labels.html.jinja" with context %}
{% endwith %}
{% endblock labels %}
@@ -98,8 +97,7 @@ Context:
This block renders the docstring for the module.
-#}
{% with docstring_sections = module.docstring.parsed %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% endblock docstring %}
@@ -112,8 +110,7 @@ Context:
This block renders auto-summaries for classes, methods, and attributes.
-#}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "summary"|get_template with context %}
+ {% include "summary.html.jinja" with context %}
{% endblock summary %}
{% block children scoped %}
@@ -123,8 +120,7 @@ Context:
-#}
{% set root = False %}
{% set heading_level = heading_level + 1 %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "children"|get_template with context %}
+ {% include "children.html.jinja" with context %}
{% endblock children %}
{% endblock contents %}
{% block contents scoped %}
{#- Contents block.
-
+
This block renders the contents of the class.
It contains other blocks that users can override.
Overriding the contents block allows to rearrange the order of the blocks.
-#}
{% block bases scoped %}
{#- Class bases block.
-
+
This block renders the bases for the class.
-#}
{% if config.show_bases and class.bases %}
Bases: {% for expression in class.bases -%}
- {% include "expression"|get_template with context %}{% if not loop.last %}, {% endif %}
+ {% include "expression.html.jinja" with context %}{% if not loop.last %}, {% endif %}
{% endfor -%}
{% endif %}
@@ -125,7 +125,7 @@ Context:
{% block inheritance_diagram scoped %}
{#- Inheritance diagram block.
-
+
This block renders the inheritance diagram for the class,
using Mermaid syntax and a bit of JavaScript to make the nodes clickable,
linking to the corresponding class documentation.
@@ -173,17 +173,17 @@ Context:
{% block docstring scoped %}
{#- Docstring block.
-
+
This block renders the docstring for the class.
-#}
{% with docstring_sections = class.docstring.parsed %}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% if config.merge_init_into_class %}
{% if "__init__" in class.all_members and class.all_members["__init__"].has_docstring %}
{% with function = class.all_members["__init__"] %}
{% with obj = function, docstring_sections = function.docstring.parsed %}
- {% include "docstring"|get_template with context %}
+ {% include "docstring.html.jinja" with context %}
{% endwith %}
{% endwith %}
{% endif %}
@@ -192,15 +192,15 @@ Context:
{% block summary scoped %}
{#- Summary block.
-
+
This block renders auto-summaries for classes, methods, and attributes.
-#}
- {% include "summary"|get_template with context %}
+ {% include "summary.html.jinja" with context %}
{% endblock summary %}
{% block source scoped %}
{#- Source block.
-
+
This block renders the source code for the class.
-#}
{% if config.show_source %}
@@ -236,12 +236,12 @@ Context:
{% block children scoped %}
{#- Children block.
-
+
This block renders the children (members) of the class.
-#}
{% set root = False %}
{% set heading_level = heading_level + 1 %}
- {% include "children"|get_template with context %}
+ {% include "children.html.jinja" with context %}
{% endblock children %}
{% endblock contents %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html
deleted file mode 100644
index 9f2abcd1..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/attributes.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/attributes.html' is deprecated, extend '_base/docstring/attributes.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja
index e8804310..a3817449 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -34,8 +33,7 @@ Context:
{{ attribute.name }}
{% if attribute.annotation %}
{% with expression = attribute.annotation %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %})
+ ({% include "expression.html.jinja" with context %})
{% endwith %}
{% endif %}
–
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html
deleted file mode 100644
index 02261331..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/other_parameters.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/other_parameters.html' is deprecated, extend '_base/docstring/other_parameters.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja
index 6605e48d..f7af2121 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -34,8 +33,7 @@ Context:
{{ parameter.name }}
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %})
+ ({% include "expression.html.jinja" with context %})
{% endwith %}
{% endif %}
–
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html
deleted file mode 100644
index f5292150..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/parameters.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/parameters.html' is deprecated, extend '_base/docstring/parameters.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja
index de01dcbe..95c480fa 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -34,12 +33,10 @@ Context:
{{ parameter.name }}
{% if parameter.annotation %}
{% with expression = parameter.annotation, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- ({% include "expression"|get_template with context %}
+ ({% include "expression.html.jinja" with context %}
{%- if parameter.default %}, {{ lang.t("default:") }}
{% with expression = parameter.default, backlink_type = "used-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %})
{% endwith %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html
deleted file mode 100644
index 38a21e89..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/raises.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/raises.html' is deprecated, extend '_base/docstring/raises.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja
index cf7d0b01..71beb34c 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -33,8 +32,7 @@ Context:
{% if raises.annotation %}
{% with expression = raises.annotation, backlink_type = "raised-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
–
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html
deleted file mode 100644
index d9c404b6..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/receives.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/receives.html' is deprecated, extend '_base/docstring/receives.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja
index 84d6c1bc..8ad9cae3 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -35,8 +34,7 @@ Context:
{% if receives.annotation %}
{% with expression = receives.annotation, backlink_type = "received-by" %}
{% if receives.name %}({% endif %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% if receives.name %}){% endif %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html
deleted file mode 100644
index b608af5f..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/returns.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/returns.html' is deprecated, extend '_base/docstring/returns.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja
index c1171c7e..2201f545 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -35,8 +34,7 @@ Context:
{% if returns.annotation %}
{% with expression = returns.annotation, backlink_type = "returned-by" %}
{% if returns.name %}({% endif %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% if returns.name %}){% endif %}
{% endwith %}
{% endif %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html
deleted file mode 100644
index 9eba72ab..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/warns.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/warns.html' is deprecated, extend '_base/docstring/warns.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja
index 5570ca37..97cbc1de 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
@@ -33,8 +32,7 @@ Context:
{% if warns.annotation %}
{% with expression = warns.annotation, backlink_type = "emitted-by" %}
- {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
- {% include "expression"|get_template with context %}
+ {% include "expression.html.jinja" with context %}
{% endwith %}
{% endif %}
–
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html
deleted file mode 100644
index 6ec31dd0..00000000
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{# YORE: Bump 2: Remove file. #}
-{% extends "_base/docstring/yields.html.jinja" %}
-
-{% block logs scoped %}
- {{ super() }}
- {{ log.warning(
- "DeprecationWarning: Extending '_base/docstring/yields.html' is deprecated, extend '_base/docstring/yields.html.jinja' instead. ",
- once=True,
- ) }}
-{% endblock logs %}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja
index 712776fe..8298421f 100644
--- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja
@@ -15,8 +15,7 @@ Context:
{{ log.debug() }}
{% endblock %}
-{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
-{% import "language"|get_template as lang with context %}
+{% import "language.html.jinja" as lang with context %}
{#- Language module providing the `t` translation method. -#}
-*And 8 more private sponsor(s).*
+*And 7 more private sponsor(s).*
From 0ae77a3454d47e873be38637ea30d043004ee981 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Sat, 24 Jan 2026 17:11:27 +0100
Subject: [PATCH 29/49] fix: Fix aliases for parameters
Issue-mkdocstrings-813: https://github.com/mkdocstrings/mkdocstrings/issues/813
---
src/mkdocstrings_handlers/python/_internal/handler.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mkdocstrings_handlers/python/_internal/handler.py b/src/mkdocstrings_handlers/python/_internal/handler.py
index bd95023f..0fae5dc1 100644
--- a/src/mkdocstrings_handlers/python/_internal/handler.py
+++ b/src/mkdocstrings_handlers/python/_internal/handler.py
@@ -330,7 +330,7 @@ def get_aliases(self, identifier: str) -> tuple[str, ...]:
"""
if "(" in identifier:
identifier, parameter = identifier.split("(", 1)
- parameter.removesuffix(")")
+ parameter = parameter.removesuffix(")")
else:
parameter = ""
try:
From 4e546b5ddc527c74cfa695890faea404a69b7ee2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Mon, 9 Feb 2026 16:11:48 +0100
Subject: [PATCH 30/49] chore: Prepare release 2.0.2
---
CHANGELOG.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 29729f36..9d154658 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [2.0.2](https://github.com/mkdocstrings/python/releases/tag/2.0.2) - 2026-02-09
+
+[Compare with 2.0.1](https://github.com/mkdocstrings/python/compare/2.0.1...2.0.2)
+
+### Bug Fixes
+
+- Fix aliases for parameters ([0ae77a3](https://github.com/mkdocstrings/python/commit/0ae77a3454d47e873be38637ea30d043004ee981) by Timothée Mazzucotelli). [Issue-mkdocstrings-813](https://github.com/mkdocstrings/mkdocstrings/issues/813)
+
## [2.0.1](https://github.com/mkdocstrings/python/releases/tag/2.0.1) - 2025-12-03
[Compare with 2.0.0](https://github.com/mkdocstrings/python/compare/2.0.0...2.0.1)
From 186d6cfac78dbc96bcb753473ceb68db5fa46f73 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Tue, 10 Feb 2026 02:40:52 +0000
Subject: [PATCH 31/49] chore: Update sponsors section in README
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 6210b54a..2d559588 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,6 @@ dependencies = [
Silver sponsors
-
Bronze sponsors
From 95f58aa56a78df160fc66892815cb4c49d291044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 20 Feb 2026 11:06:58 +0100
Subject: [PATCH 32/49] ci: Minor lint fixes
---
scripts/gen_credits.py | 2 +-
scripts/griffe_extensions.py | 2 +-
.../python/_internal/config.py | 2 +-
.../python/_internal/handler.py | 2 +-
.../python/_internal/rendering.py | 14 +++++++-------
tests/test_api.py | 4 ++--
tests/test_rendering.py | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/scripts/gen_credits.py b/scripts/gen_credits.py
index 6a81e239..0eab7685 100644
--- a/scripts/gen_credits.py
+++ b/scripts/gen_credits.py
@@ -55,7 +55,7 @@ def _extra_marker(req: Requirement) -> str | None:
if not req.marker:
return None
try:
- return next(marker[2].value for marker in req.marker._markers if getattr(marker[0], "value", None) == "extra")
+ return next(marker[2].value for marker in req.marker._markers if getattr(marker[0], "value", None) == "extra") # type: ignore[union-attr]
except StopIteration:
return None
diff --git a/scripts/griffe_extensions.py b/scripts/griffe_extensions.py
index eb50f5f2..5a4447ca 100644
--- a/scripts/griffe_extensions.py
+++ b/scripts/griffe_extensions.py
@@ -24,7 +24,7 @@ def on_attribute_instance(
if attr.docstring:
return
try:
- field: griffe.ExprCall = attr.annotation.slice.elements[1] # type: ignore[union-attr]
+ field: griffe.ExprCall = attr.annotation.slice.elements[1]
except AttributeError:
return
diff --git a/src/mkdocstrings_handlers/python/_internal/config.py b/src/mkdocstrings_handlers/python/_internal/config.py
index 79ba87f9..f9f8963b 100644
--- a/src/mkdocstrings_handlers/python/_internal/config.py
+++ b/src/mkdocstrings_handlers/python/_internal/config.py
@@ -498,7 +498,7 @@ class PythonInputOptions:
those added to `__all__` or not starting with an underscore (except for special methods/attributes).
""",
),
- ] = field(default_factory=lambda: _DEFAULT_FILTERS.copy())
+ ] = field(default_factory=_DEFAULT_FILTERS.copy)
find_stubs_package: Annotated[
bool,
diff --git a/src/mkdocstrings_handlers/python/_internal/handler.py b/src/mkdocstrings_handlers/python/_internal/handler.py
index 0fae5dc1..b84cd8ba 100644
--- a/src/mkdocstrings_handlers/python/_internal/handler.py
+++ b/src/mkdocstrings_handlers/python/_internal/handler.py
@@ -203,7 +203,7 @@ def collect(self, identifier: str, options: PythonOptions) -> CollectorItem:
extensions=load_extensions(*extensions),
search_paths=self._paths,
docstring_parser=parser,
- docstring_options=parser_options, # type: ignore[arg-type]
+ docstring_options=parser_options,
modules_collection=self._modules_collection,
lines_collection=self._lines_collection,
allow_inspection=options.allow_inspection,
diff --git a/src/mkdocstrings_handlers/python/_internal/rendering.py b/src/mkdocstrings_handlers/python/_internal/rendering.py
index 20ae7c54..a906b465 100644
--- a/src/mkdocstrings_handlers/python/_internal/rendering.py
+++ b/src/mkdocstrings_handlers/python/_internal/rendering.py
@@ -414,15 +414,15 @@ def _keep_object(name: str, filters: Sequence[tuple[Pattern, bool]]) -> bool:
def _parents(obj: Alias) -> set[str]:
- parent: Object | Alias = obj.parent # type: ignore[assignment]
+ parent: Object | Alias = obj.parent
parents = {obj.path, parent.path}
if parent.is_alias:
- parents.add(parent.final_target.path) # type: ignore[union-attr]
+ parents.add(parent.final_target.path)
while parent.parent:
parent = parent.parent
parents.add(parent.path)
if parent.is_alias:
- parents.add(parent.final_target.path) # type: ignore[union-attr]
+ parents.add(parent.final_target.path)
return parents
@@ -431,7 +431,7 @@ def _remove_cycles(objects: list[Object | Alias]) -> Iterator[Object | Alias]:
for obj in objects:
if obj.is_alias:
with suppress_errors:
- if obj.final_target.path in _parents(obj): # type: ignore[arg-type,union-attr]
+ if obj.final_target.path in _parents(obj):
continue
yield obj
@@ -778,7 +778,7 @@ def expand_identifier(self, identifier: str) -> str:
obj = self.current_object
while identifier and identifier[0] == ".":
identifier = identifier[1:]
- obj = obj.parent # type: ignore[assignment]
+ obj = obj.parent
identifier = f"{obj.path}.{identifier}" if identifier else obj.path
# We resolve the identifier to its full path.
@@ -809,8 +809,8 @@ def get_context(self) -> AutorefsHookInterface.Context:
}.get(self.current_object.kind.value.lower(), "obj")
origin = self.current_object.path
try:
- filepath = self.current_object.docstring.parent.filepath # type: ignore[union-attr]
- lineno = self.current_object.docstring.lineno or 0 # type: ignore[union-attr]
+ filepath = self.current_object.docstring.parent.filepath
+ lineno = self.current_object.docstring.lineno or 0
except AttributeError:
filepath = self.current_object.filepath
lineno = 0
diff --git a/tests/test_api.py b/tests/test_api.py
index 3322e2e6..85432b54 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -51,7 +51,7 @@ def _yield_public_objects(
if modules:
yield member
yield from _yield_public_objects(
- member, # type: ignore[arg-type]
+ member,
modules=modules,
modulelevel=modulelevel,
inherited=inherited,
@@ -63,7 +63,7 @@ def _yield_public_objects(
continue
if member.is_class and not modulelevel:
yield from _yield_public_objects(
- member, # type: ignore[arg-type]
+ member,
modules=modules,
modulelevel=False,
inherited=inherited,
diff --git a/tests/test_rendering.py b/tests/test_rendering.py
index 2616610f..91f945a8 100644
--- a/tests/test_rendering.py
+++ b/tests/test_rendering.py
@@ -78,7 +78,7 @@ def test_filter_objects(names: list[str], filter_params: dict[str, Any], expecte
expected_names: Names expected to be kept.
"""
objects = {name: _FakeObject(name) for name in names}
- filtered = rendering.do_filter_objects(objects, **filter_params) # type: ignore[arg-type]
+ filtered = rendering.do_filter_objects(objects, **filter_params)
filtered_names = {obj.name for obj in filtered}
assert set(filtered_names) == set(expected_names)
From 770a5f69d801f24f0b36d1e671a540196e06f710 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 20 Feb 2026 11:37:51 +0100
Subject: [PATCH 33/49] build: Depend on griffelib instead of griffe
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 2d6c7188..96d3c713 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -32,7 +32,7 @@ classifiers = [
dependencies = [
"mkdocstrings>=0.30",
"mkdocs-autorefs>=1.4",
- "griffe>=1.13",
+ "griffelib>=2.0",
"typing-extensions>=4.0; python_version < '3.11'",
]
From a0b99c5ed6ac44b627e2e57375e474e0939ea02e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 20 Feb 2026 11:38:23 +0100
Subject: [PATCH 34/49] chore: Prepare release 2.0.3
---
CHANGELOG.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d154658..5120a58a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [2.0.3](https://github.com/mkdocstrings/python/releases/tag/2.0.3) - 2026-02-20
+
+[Compare with 2.0.2](https://github.com/mkdocstrings/python/compare/2.0.2...2.0.3)
+
+### Build
+
+- Depend on griffelib instead of griffe ([770a5f6](https://github.com/mkdocstrings/python/commit/770a5f69d801f24f0b36d1e671a540196e06f710) by Timothée Mazzucotelli).
+
## [2.0.2](https://github.com/mkdocstrings/python/releases/tag/2.0.2) - 2026-02-09
[Compare with 2.0.1](https://github.com/mkdocstrings/python/compare/2.0.1...2.0.2)
From 7bf8b98cc03e1cb3573e88aecaa3ebd60c7fa9ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 5 Jun 2026 10:10:17 +0200
Subject: [PATCH 35/49] fix: Display Methods instead of Functions for category
headings inside classes
Issue-330: https://github.com/mkdocstrings/python/issues/330
---
.../python/templates/material/_base/children.html.jinja | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja
index 63f3b1a6..5be9f585 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja
@@ -108,7 +108,7 @@ Context:
) %}
{% if functions %}
{% if config.show_category_heading %}
- {% filter heading(heading_level, id=html_id ~ "-functions", skip_inventory=config.skip_local_inventory) %}{{ lang.t("Functions") }}{% endfilter %}
+ {% filter heading(heading_level, id=html_id ~ "-functions", skip_inventory=config.skip_local_inventory) %}{{ lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}{% endfilter %}
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for function in functions|order_members(config.members_order, members_list) %}
From dc6aa93b1c956bc02904f33d1f6f635b275175d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 5 Jun 2026 10:12:32 +0200
Subject: [PATCH 36/49] chore: Prepare release 2.0.4
---
CHANGELOG.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5120a58a..3769a7eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [2.0.4](https://github.com/mkdocstrings/python/releases/tag/2.0.4) - 2026-06-05
+
+[Compare with 2.0.3](https://github.com/mkdocstrings/python/compare/2.0.3...2.0.4)
+
+### Bug Fixes
+
+- Display Methods instead of Functions for category headings inside classes ([7bf8b98](https://github.com/mkdocstrings/python/commit/7bf8b98cc03e1cb3573e88aecaa3ebd60c7fa9ca) by Timothée Mazzucotelli). [Issue-330](https://github.com/mkdocstrings/python/issues/330)
+
## [2.0.3](https://github.com/mkdocstrings/python/releases/tag/2.0.3) - 2026-02-20
[Compare with 2.0.2](https://github.com/mkdocstrings/python/compare/2.0.2...2.0.3)
From 835a406387247714647bc0d24f0641ee7a2bcb79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 19 Jun 2026 12:33:06 +0200
Subject: [PATCH 37/49] chore: Never fail type-checking (maintenance mode)
---
duties.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/duties.py b/duties.py
index 3aa9b662..8bf362fc 100644
--- a/duties.py
+++ b/duties.py
@@ -78,7 +78,7 @@ def check_docs(ctx: Context) -> None:
)
-@duty(nofail=PY_VERSION == PY_DEV)
+@duty(nofail=True)
def check_types(ctx: Context) -> None:
"""Check that the code is correctly typed."""
os.environ["MYPYPATH"] = "src"
@@ -86,8 +86,6 @@ def check_types(ctx: Context) -> None:
ctx.run(
tools.mypy(*PY_SRC_LIST, config_file="config/mypy.ini"),
title=pyprefix("Type-checking"),
- # TODO: Update when Pydantic supports 3.14.
- nofail=sys.version_info >= (3, 14),
)
From 39311c7ca55a55d34b3d5c3667e669820e6ab3bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?=
Date: Fri, 19 Jun 2026 12:35:35 +0200
Subject: [PATCH 38/49] docs: Lint docs
---
docs/usage/configuration/docstrings.md | 12 ++++++------
docs/usage/configuration/general.md | 6 +++---
docs/usage/configuration/headings.md | 10 +++++++---
docs/usage/configuration/members.md | 8 ++++----
docs/usage/configuration/signatures.md | 4 ++++
5 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/docs/usage/configuration/docstrings.md b/docs/usage/configuration/docstrings.md
index 95f9032f..dc2d6c2c 100644
--- a/docs/usage/configuration/docstrings.md
+++ b/docs/usage/configuration/docstrings.md
@@ -214,8 +214,8 @@ In that case, the Spacy tables can help.
**Type** | **Name** | **Description** | **Default**
---------- | ----------- | ------------------------ | -----------
-list[int \| float] | `gravity_forces` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | *required*
-VacuumType \| Literal["regular"] | `vacuum_type` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | `VacuumType.PLASMA`
+list\[int \| float\] | `gravity_forces` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | *required*
+VacuumType \| Literal\["regular"\] | `vacuum_type` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | `VacuumType.PLASMA`
////
//// tab | List
@@ -228,8 +228,8 @@ Lists work well whatever the length of names, type annotations, descriptions, et
**Other Parameters:**
-- `gravity_forces` (list[int \| float]) — Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-- `vacuum_type` (VacuumType \| Literal["regular"]) — Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+- `gravity_forces` (list\[int \| float\]) — Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+- `vacuum_type` (VacuumType \| Literal\["regular"\]) — Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
////
//// tab | Spacy
@@ -247,8 +247,8 @@ by reserving more horizontal space on the second column.
**Name** | **Description**
----------- | ---------------
-`gravity_forces` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. **TYPE:** list[int \| float]DEFAULT:required
-`vacuum_type` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. **TYPE:**VacuumType \| Literal["regular"]DEFAULT:VacuumType.PLASMA
+`gravity_forces` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. **TYPE:** list\[int \| float\]DEFAULT:required
+`vacuum_type` | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. **TYPE:**VacuumType \| Literal\["regular"\]DEFAULT:VacuumType.PLASMA
////
///
diff --git a/docs/usage/configuration/general.md b/docs/usage/configuration/general.md
index 921f3b27..f44f4ac1 100644
--- a/docs/usage/configuration/general.md
+++ b/docs/usage/configuration/general.md
@@ -63,7 +63,7 @@ plugins:
[](){#option-backlinks}
## `backlinks`
-- **:octicons-package-24: Type Literal["flat", "tree", False] :material-equal: `False`{ title="default value" }**
+- **:octicons-package-24: Type Literal\["flat", "tree", False\] :material-equal: `False`{ title="default value" }**
The `backlinks` option enables rendering of backlinks within your API documentation.
@@ -102,7 +102,7 @@ plugins:
[](){#option-extensions}
## `extensions`
-- **:octicons-package-24: Type list[str | dict[str, dict[str, Any]]] :material-equal: `[]`{ title="default value" }**
+- **:octicons-package-24: Type list\[str | dict\[str, dict\[str, Any\]\]\] :material-equal: `[]`{ title="default value" }**
The `extensions` option lets you enable [Griffe extensions](https://mkdocstrings.github.io/griffe/extensions/), which enhance or modify the data collected from Python sources (or compiled modules).
@@ -406,7 +406,7 @@ Mixin2A --> Mixin2B
[](){#option-preload_modules}
## `preload_modules`
-- **:octicons-package-24: Type list[str] | None :material-equal: `None`{ title="default value" }**
+- **:octicons-package-24: Type list\[str\] | None :material-equal: `None`{ title="default value" }**
Pre-load modules that are not specified directly in [autodoc instructions][autodoc syntax] (`::: identifier`).
diff --git a/docs/usage/configuration/headings.md b/docs/usage/configuration/headings.md
index 593b6fb0..5d261807 100644
--- a/docs/usage/configuration/headings.md
+++ b/docs/usage/configuration/headings.md
@@ -191,7 +191,7 @@ plugins:
get_version dist
-To customize symbols, see [Customizing symbol types](../customization.md/#symbol-types).
+To customize symbols, see [Customizing symbol types](../customization.md#symbol-types).
///
@@ -303,6 +303,10 @@ More text.
/// admonition | Preview
type: preview
+[](){#permalink-to-some-heading}
+[](){#permalink-to-object}
+[](){#permalink-to-other-heading}
+
//// tab | With ToC entry
**Table of contents**
[Some heading](#permalink-to-some-heading){ title="#permalink-to-some-heading" }
@@ -548,7 +552,7 @@ This option will prefix headings with
types.
See also [`show_symbol_type_toc`][show_symbol_type_toc].
-To customize symbols, see [Customizing symbol types](../customization.md/#symbol-types).
+To customize symbols, see [Customizing symbol types](../customization.md#symbol-types).
```yaml title="in mkdocs.yml (global configuration)"
plugins:
@@ -611,7 +615,7 @@ This option will prefix items in the ToC with
types.
See also [`show_symbol_type_heading`][show_symbol_type_heading].
-To customize symbols, see [Customizing symbol types](../customization.md/#symbol-types).
+To customize symbols, see [Customizing symbol types](../customization.md#symbol-types).
```yaml title="in mkdocs.yml (global configuration)"
plugins:
diff --git a/docs/usage/configuration/members.md b/docs/usage/configuration/members.md
index 53d955fa..b6a65c30 100644
--- a/docs/usage/configuration/members.md
+++ b/docs/usage/configuration/members.md
@@ -3,7 +3,7 @@
[](){#option-members}
## `members`
-- **:octicons-package-24: Type list[str] |
+- **:octicons-package-24: Type list\[str\] |
bool | None :material-equal: `None`{ title="default value" }**
@@ -99,7 +99,7 @@ INFO: **The default behavior (with unspecified `members` or `members: null`) is
[](){#option-inherited_members}
## `inherited_members`
-- **:octicons-package-24: Type list[str] |
+- **:octicons-package-24: Type list\[str\] |
bool :material-equal: `False`{ title="default value" }**
@@ -342,7 +342,7 @@ def function_c():
[](){#option-filters}
## `filters`
-- **:octicons-package-24: Type list[str] | Literal["public"] | None :material-equal: `["!^_[^_]"]`{ title="default value" }**
+- **:octicons-package-24: Type list\[str\] | Literal\["public"\] | None :material-equal: `["!^_[^_]"]`{ title="default value" }**
A list of filters, or `"public"`.
@@ -574,7 +574,7 @@ package
[](){#option-summary}
## `summary`
-- **:octicons-package-24: Type bool | dict[str, bool] :material-equal: `False`{ title="default value" }**
+- **:octicons-package-24: Type bool | dict\[str, bool\] :material-equal: `False`{ title="default value" }**
Whether to render summaries of modules, classes, functions (methods) and attributes.
diff --git a/docs/usage/configuration/signatures.md b/docs/usage/configuration/signatures.md
index 109362e3..c9ac917b 100644
--- a/docs/usage/configuration/signatures.md
+++ b/docs/usage/configuration/signatures.md
@@ -64,6 +64,8 @@ def convert(text: str, md: markdown.Markdown) -> markupsafe.Markup: