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

C++ type names appear in the docstrings #262

Open
HinTak opened this issue Aug 28, 2024 · 1 comment
Open

C++ type names appear in the docstrings #262

HinTak opened this issue Aug 28, 2024 · 1 comment

Comments

@HinTak
Copy link
Collaborator

HinTak commented Aug 28, 2024

Split off from #261,
https://pybind11.readthedocs.io/en/latest/advanced/misc.html#avoiding-cpp-types-in-docstrings

Basically the class declarations need to appear before the methods which involve them. Some can be fixed by init order, such as the Unicode class is only needed/used by the paragraph class, and perhaps the shaper class if it gets more substantial. The rest involves large rearrangements of code, for example canvas has methods involving surface and vice versa, likewise pixmap and image, etc. Some of it will go away as we remove/disable unstable APIs. Probably something to revisit before a non-beta release.

@HinTak HinTak changed the title C++ type names appears the docstrings C++ type names appears in the docstrings Aug 28, 2024
@HinTak HinTak changed the title C++ type names appears in the docstrings C++ type names appear in the docstrings Aug 28, 2024
@MeetWq
Copy link
Contributor

MeetWq commented Aug 29, 2024

I wrote a script to split the pybind11 class declarations and method definitions (though the implementation is rather stupid). The whole modification process is in the format_code branch. Maybe it can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants