Skip to content

Commit be2d7a5

Browse files
committed
🚑 Fix python#13284
1 parent a41780b commit be2d7a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎mypy/stubgenc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def generate_c_function_stub(
342342
'class_sigs'.
343343
"""
344344
inferred: list[FunctionSig] | None = None
345-
docstr: str | None = None
345+
docstr: str | None = getattr(obj, "__doc__", None) if include_docstrings else None
346346
if class_name:
347347
# method:
348348
assert cls is not None, "cls should be provided for methods"

0 commit comments

Comments
 (0)