Skip to content

Commit 90bd71c

Browse files
committed
refactor: Don't produce an empty text section when "parsing" an empty unstyled docstring
1 parent 1cbf2a3 commit 90bd71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/griffe/_internal/docstrings/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ def parse(
4949
if not isinstance(parser, Parser):
5050
parser = Parser(parser)
5151
return parsers[parser](docstring, **options)
52-
return [DocstringSectionText(docstring.value)]
52+
return [DocstringSectionText(docstring.value)] if docstring.value else []

0 commit comments

Comments
 (0)