Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

improve docstring generation #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nanobind_stubgen/NanobindStubsGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _create_doc(self, doc_str: Optional[str] = None) -> List[str]:
doc_str = self.obj.__doc__

# split doc string for per-line indentation
doc_str = str(doc_str).strip()
doc_str = doc_str.strip() if type(doc_str) == str else ""
doc_lines = [l.strip() for l in doc_str.split("\n")]

if doc_str is not None and str(doc_str).strip() != "":
Expand Down