Describe the bug
When using autodoc to generate the documentation for a module, for a function with a return type, the warning docstring of ...: WARNING: unknown node type: <desc_returns: ...> occurs and the return type is not part of the output. For example: https://gist.github.com/haukex/2b012e1490b538210d7279b94bffc4d5#file-foo-py
Describe the bug When using
autodoc
to generate the documentation for a module, for a function with a return type, the warningdocstring of ...: WARNING: unknown node type: <desc_returns: ...>
occurs and the return type is not part of the output. For example: https://gist.github.com/haukex/2b012e1490b538210d7279b94bffc4d5#file-foo-pyTo Reproduce Steps to reproduce the behavior:
git clone https://gist.github.com/2b012e1490b538210d7279b94bffc4d5.git bug_desc_returns
cd bug_desc_returns
pip install -r requirements.txt
make
.../bug_desc_returns/foo.py:docstring of foo.foo:1: WARNING: unknown node type: <desc_returns: <#text: 'int'>>
cat output/markdown/index.md
:Note how the return type
int
is missing.Expected behavior I would expect the warning not to occur and the function signature to include
-> int
.Environment Python 3.12 on Ubuntu Linux
Additional context I'm not sure, but it seems to me like sphinx_markdown_builder/translator.py needs to add support for sphinx.addnodes.desc_returns?