Skip to content

Commit 6eae4b2

Browse files
Remove leading newlines from docstrings (#19)
1 parent 283cc7e commit 6eae4b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pybind11_stubgen/printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def print_docstring(self, doc: Docstring) -> list[str]:
124124
'"""',
125125
*(
126126
line.replace("\\", r"\\").replace('"""', r"\"\"\"")
127-
for line in doc.splitlines()
127+
for line in doc.lstrip("\n").splitlines()
128128
),
129129
'"""',
130130
]

0 commit comments

Comments
 (0)