From 3415c44744a44775f8a01d51d5e700f3160e3863 Mon Sep 17 00:00:00 2001 From: Suman Saurabh Date: Wed, 5 Jun 2024 17:34:46 +0530 Subject: [PATCH 1/2] Update common.py --- PyDocSmith/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PyDocSmith/common.py b/PyDocSmith/common.py index 6e002c0..402f7f6 100644 --- a/PyDocSmith/common.py +++ b/PyDocSmith/common.py @@ -242,7 +242,11 @@ def format_docstring_to_pep257(docstring: Docstring, width: int = 72) -> Docstri for meta in docstring.meta: if meta.description: # Ensure meta descriptions are wrapped according to PEP 8 - meta.description = textwrap.fill(meta.description.strip(), width) + split_description = meta.description.split("\n") + for itm, idx in enumerate(split_description): + split_description[idx] = textwrap.fill(itm.strip(), width) + + meta.description = "\n".join(split_description) if meta.args: # Clean up args to ensure they are stripped of extra spaces meta.args = [arg.strip() for arg in meta.args if arg.strip()] From 4b486064ad7ffc109154a8a6e956233e8df128c7 Mon Sep 17 00:00:00 2001 From: Suman Saurabh Date: Wed, 5 Jun 2024 17:35:12 +0530 Subject: [PATCH 2/2] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d6de91f..295f69a 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="PyDocSmith", - version="0.1.3", + version="0.1.4", description="It parses and composes docstrings in Google, Numpydoc, ReST and Epydoc.", long_description=open("README.md").read(), long_description_content_type="text/markdown",