Skip to content

stubgenc: add support for including class and property docstrings#17964

Merged
JelleZijlstra merged 1 commit into
python:masterfrom
chadrik:stubgen/docstrings-for-c-modules
May 20, 2025
Merged

stubgenc: add support for including class and property docstrings#17964
JelleZijlstra merged 1 commit into
python:masterfrom
chadrik:stubgen/docstrings-for-c-modules

Conversation

@chadrik

@chadrik chadrik commented Oct 16, 2024

Copy link
Copy Markdown
Contributor

Prior to this change passing --include-docstrings did not generate docstrings for classes or properties, only functions. This PR brings c-extensions up to parity with pure-python modules.

I used this feature to generate stubs for this project: https://github.com/LumaPictures/cg-stubs/blob/master/usd/stubs/pxr/Usd/__init__.pyi

@github-actions

This comment has been minimized.

@chadrik chadrik force-pushed the stubgen/docstrings-for-c-modules branch from 07cde23 to b229f27 Compare February 24, 2025 02:04
@github-actions

This comment has been minimized.

@chadrik chadrik force-pushed the stubgen/docstrings-for-c-modules branch 2 times, most recently from c6ca0d5 to 787d5b6 Compare February 24, 2025 02:57
@github-actions

This comment has been minimized.

@chadrik chadrik force-pushed the stubgen/docstrings-for-c-modules branch from 787d5b6 to 7a0db40 Compare February 24, 2025 04:41
@chadrik

chadrik commented Feb 24, 2025

Copy link
Copy Markdown
Contributor Author

@hamdanal @JelleZijlstra This is ready for review.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@chadrik

chadrik commented May 19, 2025

Copy link
Copy Markdown
Contributor Author

Hi, does anyone have a moment to review this, please!

@JelleZijlstra JelleZijlstra merged commit a9bb737 into python:master May 20, 2025
@chadrik chadrik deleted the stubgen/docstrings-for-c-modules branch November 2, 2025 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants