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 1/7] 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 63f3b1a..5be9f58 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 2/7] chore: Prepare release 2.0.4 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5120a58..3769a7e 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 3/7] 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 3aa9b66..8bf362f 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 4/7] 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 95f9032..dc2d6c2 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 921f3b2..f44f4ac 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 593b6fb..5d26180 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 53d955f..b6a65c3 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 109362e..c9ac917 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:

Convert text to Markdown.

Parameters:

+[](){#ref-to-markdown} + **Type** | **Description** | **Default** ---------- | ------------------------ | ----------- [`str`][] | The text to convert. | *required* @@ -71,6 +73,8 @@ def convert(text: str, md: markdown.Markdown) -> markupsafe.Markup:

Returns:

+[](){#ref-to-markup} + **Type** | **Name** | **Description** ---------- | ----------- | --------------- [`Markup`](#ref-to-markup){ .external title="markupsafe.Markup" } | `text` | Converted markup. From 033413123b95c0788f500b871f00ed1223ae2b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Fri, 19 Jun 2026 12:37:00 +0200 Subject: [PATCH 5/7] fix: Always display attribute values as they're written in the source Issue-311: https://github.com/mkdocstrings/python/issues/311 --- src/mkdocstrings_handlers/python/_internal/rendering.py | 8 +++++++- .../python/templates/material/_base/expression.html.jinja | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mkdocstrings_handlers/python/_internal/rendering.py b/src/mkdocstrings_handlers/python/_internal/rendering.py index a906b46..d5ffc8e 100644 --- a/src/mkdocstrings_handlers/python/_internal/rendering.py +++ b/src/mkdocstrings_handlers/python/_internal/rendering.py @@ -245,7 +245,13 @@ def do_format_attribute( ) signature += f": {annotation}" if show_value and attribute.value: - value = template.render(context.parent, expression=attribute.value, signature=True, backlink_type="used-by") + value = template.render( + context.parent, + expression=attribute.value, + signature=True, + annotations_path="source", + backlink_type="used-by", + ) signature += f" = {value}" signature = do_format_code(signature, line_length) diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja index 4f44ae0..60585a5 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja @@ -169,4 +169,4 @@ Context: {%- if config.modernize_annotations and expression is not string -%} {%- set expression = expression.modernize() -%} {%- endif -%} -{{ render(expression, config.annotations_path, backlink_type|default("")) }} +{{ render(expression, annotations_path|default(config.annotations_path), backlink_type|default("")) }} From abe28889584df8fb0bc923dfad6f2ddaff41bb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Fri, 19 Jun 2026 12:38:15 +0200 Subject: [PATCH 6/7] fix: Allow relative cross-references to work in summaries Issue-331: https://github.com/mkdocstrings/python/issues/331 --- .../material/_base/docstring/attributes.html.jinja | 8 ++++---- .../templates/material/_base/docstring/classes.html.jinja | 8 ++++---- .../material/_base/docstring/functions.html.jinja | 8 ++++---- .../templates/material/_base/docstring/modules.html.jinja | 8 ++++---- .../material/_base/docstring/type_aliases.html.jinja | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) 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 894639a..e336e46 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 @@ -43,7 +43,7 @@ Context:
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
@@ -66,7 +66,7 @@ Context: {% endif %} –
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}
{% endfor %} @@ -88,7 +88,7 @@ Context: {{ attribute.name }}
- {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[attribute.name], config))) }}

{% if attribute.annotation %} @@ -106,4 +106,4 @@ Context: {% endblock spacy_style %} -{% endif %} \ No newline at end of file +{% endif %} 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 b139a76..7dff6c9 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 @@ -35,7 +35,7 @@ Context: {{ class.name }}

- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
@@ -53,7 +53,7 @@ Context: {{ class.name }}
- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
{% endfor %} @@ -75,7 +75,7 @@ Context: {{ class.name }}
- {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ class.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[class.name], config))) }}
@@ -83,4 +83,4 @@ Context: {% endblock spacy_style %} -{% endif %} \ No newline at end of file +{% endif %} 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 afec8f6..ad9e3b2 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 @@ -36,7 +36,7 @@ Context: {{ function.name }}
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
@@ -56,7 +56,7 @@ Context: {{ function.name }}
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
{% endif %} @@ -80,7 +80,7 @@ Context: {{ function.name }}
- {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ function.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[function.name], config))) }}
@@ -89,4 +89,4 @@ Context: {% endblock spacy_style %} -{% endif %} \ No newline at end of file +{% endif %} 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 5556cf1..d366d0d 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 @@ -35,7 +35,7 @@ Context: {{ module.name }}
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
@@ -53,7 +53,7 @@ Context: {{ module.name }}
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
{% endfor %} @@ -75,7 +75,7 @@ Context: {{ module.name }}
- {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[module.name], config))) }}
@@ -83,4 +83,4 @@ Context: {% endblock spacy_style %} -{% endif %} \ No newline at end of file +{% endif %} 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 e1c8775..3ccd947 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 @@ -35,7 +35,7 @@ Context: {{ type_alias.name }}
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
@@ -53,7 +53,7 @@ Context: {{ type_alias.name }}
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
{% endfor %} @@ -75,7 +75,7 @@ Context: {{ type_alias.name }}
- {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} + {{ type_alias.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook|default(AutorefsHook(obj[type_alias.name], config))) }}
From 1670ecbecdab0f8e205d66a3b86d6620e79ece03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Fri, 19 Jun 2026 12:40:49 +0200 Subject: [PATCH 7/7] chore: Prepare release 2.0.5 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3769a7e..0ea1cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ 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.5](https://github.com/mkdocstrings/python/releases/tag/2.0.5) - 2026-06-19 + +[Compare with 2.0.4](https://github.com/mkdocstrings/python/compare/2.0.4...2.0.5) + +### Bug Fixes + +- Allow relative cross-references to work in summaries ([abe2888](https://github.com/mkdocstrings/python/commit/abe28889584df8fb0bc923dfad6f2ddaff41bb7a) by Timothée Mazzucotelli). [Issue-331](https://github.com/mkdocstrings/python/issues/331) +- Always display attribute values as they're written in the source ([0334131](https://github.com/mkdocstrings/python/commit/033413123b95c0788f500b871f00ed1223ae2b82) by Timothée Mazzucotelli). [Issue-311](https://github.com/mkdocstrings/python/issues/311) + ## [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)