diff --git a/CHANGELOG.md b/CHANGELOG.md index ff40c44..29a811d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# (Fork) 0.0.9 (2024-06-26) + +- Switched to pprint to show details of a `Docstring` object + # (Fork) 0.0.8 (2024-06-23) - Added support for parsing attributes from Sphinx-style docstrings diff --git a/docstring_parser/common.py b/docstring_parser/common.py index 2fe14b3..45ddd13 100644 --- a/docstring_parser/common.py +++ b/docstring_parser/common.py @@ -1,5 +1,6 @@ """Common methods for parsing.""" import enum +import pprint import typing as T ATTR_KEYWORDS = { @@ -206,7 +207,7 @@ def __init__( self.style = style # type: T.Optional[DocstringStyle] def __repr__(self) -> str: - return str(self.__dict__) + return pprint.pformat(self.__dict__, indent=2) @property def description(self) -> T.Optional[str]: diff --git a/pyproject.toml b/pyproject.toml index d15103a..a2d8ce8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "docstring_parser_fork" -version = "0.0.8" +version = "0.0.9" description = "Parse Python docstrings in reST, Google and Numpydoc format" authors = ["Marcin Kurczewski "] license = "MIT"