Skip to content

Commit 073841e

Browse files
authored
Merge pull request #17 from parikshit14/bug/docstring
added comments for docstring parsing
2 parents d04c5f6 + 6c93c63 commit 073841e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/modelspec/base_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ def _parse_definition(cls) -> str:
373373
p = parse(cls.__doc__)
374374

375375
# Extract the description, use the long description if available.
376+
# "short_description" only parse the first non-empty line and
377+
# "long_description" parse the rest of the docstring i.e.
378+
# it skips the first non-empty line and parse the rest of the docstring
376379
if p.long_description:
377380
definition = f"{p.short_description} {p.long_description}"
378381
else:

0 commit comments

Comments
 (0)