Skip to content

Commit

Permalink
πŸš‘ Fix python#13284
Browse files Browse the repository at this point in the history
  • Loading branch information
yosh-matsuda committed Oct 13, 2023
1 parent a41780b commit be2d7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/stubgenc.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def generate_c_function_stub(
'class_sigs'.
"""
inferred: list[FunctionSig] | None = None
docstr: str | None = None
docstr: str | None = getattr(obj, "__doc__", None) if include_docstrings else None
if class_name:
# method:
assert cls is not None, "cls should be provided for methods"
Expand Down

0 comments on commit be2d7a5

Please sign in to comment.