nanobind-stubgen
nanobind-stubgen copied to clipboard
Generate python stub files for code completion in IDEs for nanobind modules.
`nb_type` types have a suffix
check for `__doc__` to be a `str` and not `None` to emit docstrings
adds support for handling submodules
add generation of `__all__` array to make `import * from xxx` work properly
all method overloads need the `@overload` decorator for autocompletion to work properly
## Fix docstring indentations Consider this docstring: ``` """ This is a sample docstring. .. warning:: This is a sample warning message. Sphinx requires this to be indented correctly """...
If `class Base` and `class Derived : public Base` are wrapped, with `Base::foo()` and `Derived::bar()` in them, the generated stub lists both `foo` and `bar` under `Derived` separately, instead of...