diff --git a/CHANGELOG.md b/CHANGELOG.md index a639b70..1ac6e8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ 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). +## [1.18.2](https://github.com/mkdocstrings/python/releases/tag/1.18.2) - 2025-08-28 + +[Compare with 1.18.1](https://github.com/mkdocstrings/python/compare/1.18.1...1.18.2) + +### Bug Fixes + +- Normalize spaces to underscores when passing object to rendering context using its kind as key ([6f79be0](https://github.com/mkdocstrings/python/commit/6f79be0ea83522021e16e5d401209e58576ef93a) by Timothée Mazzucotelli). [Issue-mkdocstrings-791](https://github.com/mkdocstrings/mkdocstrings/issues/791) + +## [1.18.1](https://github.com/mkdocstrings/python/releases/tag/1.18.1) - 2025-08-28 + +[Compare with 1.18.0](https://github.com/mkdocstrings/python/compare/1.18.0...1.18.1) + +### Bug Fixes + +- Don't show implementation signature of `__init__` method when `overloads_only` is true and it is merged into the class ([9ef620f](https://github.com/mkdocstrings/python/commit/9ef620f2b1ae80b3711a2e84ab12d7d2c4a2dbdd) by Timothée Mazzucotelli). [Issue-308](https://github.com/mkdocstrings/python/issues/308) + ## [1.18.0](https://github.com/mkdocstrings/python/releases/tag/1.18.0) - 2025-08-26 [Compare with 1.17.0](https://github.com/mkdocstrings/python/compare/1.17.0...1.18.0) diff --git a/docs/usage/configuration/headings.md b/docs/usage/configuration/headings.md index ee10e38..8e904e5 100644 --- a/docs/usage/configuration/headings.md +++ b/docs/usage/configuration/headings.md @@ -744,6 +744,7 @@ plugins: summary: false separate_signature: true show_signature_type_parameters: true + show_inheritance_diagram: false type_parameter_headings: true ``` @@ -765,6 +766,7 @@ plugins: show_docstring_description: false show_docstring_parameters: false show_docstring_returns: false + show_inheritance_diagram: false ``` //// @@ -781,6 +783,7 @@ plugins: show_docstring_description: false show_docstring_parameters: false show_docstring_returns: false + show_inheritance_diagram: false ``` //// @@ -797,6 +800,7 @@ plugins: show_docstring_description: false show_docstring_parameters: false show_docstring_returns: false + show_inheritance_diagram: false ``` //// /// diff --git a/src/mkdocstrings_handlers/python/_internal/handler.py b/src/mkdocstrings_handlers/python/_internal/handler.py index c62088b..fbed2b8 100644 --- a/src/mkdocstrings_handlers/python/_internal/handler.py +++ b/src/mkdocstrings_handlers/python/_internal/handler.py @@ -295,7 +295,7 @@ def render(self, data: CollectorItem, options: PythonOptions, locale: str | None return template.render( **{ "config": options, - data.kind.value: data, + data.kind.value.replace(" ", "_"): data, # Heading level is a "state" variable, that will change at each step # of the rendering recursion. Therefore, it's easier to use it as a plain value # than as an item in a dictionary. 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 50385f4..23b3f45 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja @@ -107,7 +107,7 @@ Context: {% endfor %} {% endif %} - {% if config.separate_signature %} + {% if config.separate_signature and not (config.show_overloads and function.overloads and config.overloads_only) %} {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %} {{ class.name }} {% endfilter %}