diff --git a/pybind11_stubgen/printer.py b/pybind11_stubgen/printer.py index 8ef4af2..5412ba9 100644 --- a/pybind11_stubgen/printer.py +++ b/pybind11_stubgen/printer.py @@ -124,7 +124,7 @@ def print_docstring(self, doc: Docstring) -> list[str]: '"""', *( line.replace("\\", r"\\").replace('"""', r"\"\"\"") - for line in doc.splitlines() + for line in doc.lstrip("\n").splitlines() ), '"""', ]