Generate Python stubs with m.css for IDE autocompletion and type checking #2477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based off #2415, but this time with m.css instead of pybind11-stubgen. Which ensures that the output is consistent with online docs, includes various special casing for Habitat, module renaming, etc.
Work-in-progress documentation for the stub generator.
I'm marking it as a draft because even though it works quite well on my own Magnum bindings, there's of course an infinite amount of possibilities where it could break on other code, after all it's just about two weeks of work. Important differences to the previous approach:
__all__
properties you can control what gets shown in IDE autocompletion hints and thus better drive users to the desirable way of use, matching the actual documentation.docutils
etc.). Right now it does both, so it's slower than it could theoretically be.Looking forward for your feedback. Let me know once you stumble upon something that feels off.