You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For native code extension modules sphinx autodoc extracts the function signature, including type hints, from the first line of the docstring when autodoc_docstring_signature is set.
I dug around pretty deep in the code and as far as I can tell all of the methods used by this extension tap into the __annotations__ dict, which native functions don't have. Can this extension be configured to use the signature extraction that sphinx provides?
I guess I should add that I'm using napoleon with Google style docstrings, following #15, but writing :param:s directly doesn't make any difference.
Below is my current solution (to be put in conf.py). It works, but it's exceedingly janky and will probably breaks in many exciting ways in the future.
For native code extension modules sphinx autodoc extracts the function signature, including type hints, from the first line of the docstring when
autodoc_docstring_signature
is set.I dug around pretty deep in the code and as far as I can tell all of the methods used by this extension tap into the
__annotations__
dict, which native functions don't have. Can this extension be configured to use the signature extraction that sphinx provides?I guess I should add that I'm using napoleon with Google style docstrings, following #15, but writing
:param:
s directly doesn't make any difference.Below is my current solution (to be put in
conf.py
). It works, but it's exceedingly janky and will probably breaks in many exciting ways in the future.The text was updated successfully, but these errors were encountered: