Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autodoc: Use type stub files when documenting native modules #13253

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AA-Turner
Copy link
Member

Purpose

This builds on work originally proposed by @alliefitter in #4824. Autodoc now attempts to load a .pyi stub file for any native modules being documented.

Currently this will become the default behaviour, but we could put it behind an environment variable if it might be disruptive (SPHINX_AUTODOC_USE_NATIVE_STUB_FILES?).

cc commenters from original threads: @JosXa, @hoefling, @Vanuan, @cmpute, @brenthuisman, @kdschlosser, @jonnor.

References

A

@AA-Turner AA-Turner added type:enhancement enhance or introduce a new feature extensions:autodoc labels Jan 19, 2025
@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 19, 2025
@AA-Turner AA-Turner changed the title Refactor import_module autodoc: Use type stub files when documenting native modules Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use PEP 484 stub files when documenting native extensions with autodoc
1 participant