Setting up nanobind, stubs, sphinx and automodule #824
Unanswered
JeanDidierGaraud
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Shouldn't the stub be in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using sphinx, automodule and autosummary for my package's documentation (and nanobind, obviously 😉)
I forked nanobind_example to make a MRE [1].
With basic configuration (i.e. no docstring signature, no nanobind_stubs), only autofunction does a pretty rendering of functions' annotations (this was already discussed in #420).
Adding a
nanobind_example_ext.pyi
stub does not improve it (maybe it's related to this currently open sphinx issue?).If I rename the stub as .py and import it (see this commit [2]), everything is nicely formatted as expected.
Is it the correct way to go?
[1] https://github.com/JeanDidierGaraud/nanobind_example
[2] JeanDidierGaraud/nanobind_example@34dee8c
JD
Beta Was this translation helpful? Give feedback.
All reactions