Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mkdocstrings/python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.14.4
Choose a base ref
...
head repository: mkdocstrings/python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.14.5
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Feb 5, 2025

  1. fix: Remove type from property docstring summary in summary sections

    PR-242: #242
    elfkuzco authored Feb 5, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    15f2cd4 View commit details
  2. chore: Prepare release 1.14.5

    pawamoy committed Feb 5, 2025
    Copy the full SHA
    9751b53 View commit details
Showing with 18 additions and 1 deletion.
  1. +8 −0 CHANGELOG.md
  2. +10 −1 src/mkdocstrings_handlers/python/rendering.py
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).

<!-- insertion marker -->
## [1.14.5](https://github.com/mkdocstrings/python/releases/tag/1.14.5) - 2025-02-05

<small>[Compare with 1.14.4](https://github.com/mkdocstrings/python/compare/1.14.4...1.14.5)</small>

### Bug Fixes

- Remove type from property docstring summary in summary sections ([15f2cd4](https://github.com/mkdocstrings/python/commit/15f2cd48b79a1f062086a47ea0c6bc52d89786d8) by Uchechukwu Orji). [PR-242](https://github.com/mkdocstrings/python/pull/242)

## [1.14.4](https://github.com/mkdocstrings/python/releases/tag/1.14.4) - 2025-02-04

<small>[Compare with 1.14.3](https://github.com/mkdocstrings/python/compare/1.14.3...1.14.4)</small>
11 changes: 10 additions & 1 deletion src/mkdocstrings_handlers/python/rendering.py
Original file line number Diff line number Diff line change
@@ -539,11 +539,20 @@ def do_as_attributes_section(
Returns:
An attributes docstring section.
"""

def _parse_docstring_summary(attribute: Attribute) -> str:
if attribute.docstring is None:
return ""
line = attribute.docstring.value.split("\n", 1)[0]
if ":" in line and attribute.docstring.parser_options.get("returns_type_in_property_summary", False):
_, line = line.split(":", 1)
return line

return DocstringSectionAttributes(
[
DocstringAttribute(
name=attribute.name,
description=attribute.docstring.value.split("\n", 1)[0] if attribute.docstring else "",
description=_parse_docstring_summary(attribute),
annotation=attribute.annotation,
value=attribute.value, # type: ignore[arg-type]
)