diff --git a/CHANGELOG.md b/CHANGELOG.md index 619b7ee7..117e17ba 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). +## [1.6.1](https://github.com/mkdocstrings/python/releases/tag/1.6.1) - 2023-09-04 + +[Compare with 1.6.0](https://github.com/mkdocstrings/python/compare/1.6.0...1.6.1) + +### Bug Fixes + +- Fix spacing for rendered named items in Yields, Receives and Returns sections (list style) ([e12688e](https://github.com/mkdocstrings/python/commit/e12688ecb7d868047f794300eb2638d052563e68) by Timothée Mazzucotelli). +- Fix rendering Receives sections as lists ([9ff7e68](https://github.com/mkdocstrings/python/commit/9ff7e68b58e2ab0829c73e4e62254325a4f766ac) by Timothée Mazzucotelli). + ## [1.6.0](https://github.com/mkdocstrings/python/releases/tag/1.6.0) - 2023-08-27 [Compare with 1.5.2](https://github.com/mkdocstrings/python/compare/1.5.2...1.6.0) diff --git a/src/mkdocstrings_handlers/python/handler.py b/src/mkdocstrings_handlers/python/handler.py index 14d31f88..20515fdb 100644 --- a/src/mkdocstrings_handlers/python/handler.py +++ b/src/mkdocstrings_handlers/python/handler.py @@ -66,7 +66,7 @@ class PythonHandler(BaseHandler): domain: str = "py" # to match Sphinx's default domain enable_inventory: bool = True fallback_theme = "material" - fallback_config: ClassVar[dict] = {"fallback": True} # type: ignore[misc] + fallback_config: ClassVar[dict] = {"fallback": True} default_config: ClassVar[dict] = { "docstring_style": "google", "docstring_options": {}, diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html index 09b8caed..2960f385 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html @@ -44,7 +44,7 @@ {% if receives.name %}{{ receives.name }}{% endif %} {% if receives.annotation %} {% with expression = receives.annotation %} - {% if receives.name %}({% endif %} + {% if receives.name %} ({% endif %} {% include "expression.html" with context %} {% if receives.name %}){% endif %} {% endwith %} @@ -62,7 +62,7 @@ - + diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html index 374f8de4..706acf0e 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html @@ -44,7 +44,7 @@ {% if returns.name %}{{ returns.name }}{% endif %} {% if returns.annotation %} {% with expression = returns.annotation %} - {% if returns.name %}({% endif %} + {% if returns.name %} ({% endif %} {% include "expression.html" with context %} {% if returns.name %}){% endif %} {% 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 index 9a0db29c..264d25d3 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html @@ -44,7 +44,7 @@ {% if yields.name %}{{ yields.name }}{% endif %} {% if yields.annotation %} {% with expression = yields.annotation %} - {% if yields.name %}({% endif %} + {% if yields.name %} ({% endif %} {% include "expression.html" with context %} {% if yields.name %}){% endif %} {% endwith %} diff --git a/tests/conftest.py b/tests/conftest.py index 58de9e0f..0801ec0b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,9 +18,6 @@ from mkdocstrings_handlers.python.handler import PythonHandler -pytest_plugins = ["griffe.tests"] - - @pytest.fixture(name="mkdocs_conf") def fixture_mkdocs_conf(request: pytest.FixtureRequest, tmp_path: Path) -> Iterator[config.Config]: """Yield a MkDocs configuration object.
{{ (section.title or lang.t("RECEIVES")).rstrip(":").upper()) }}{{ (section.title or lang.t("RECEIVES")).rstrip(":").upper() }} {{ lang.t("DESCRIPTION") }}