sphinx-autoapi
sphinx-autoapi copied to clipboard
autoapifunction, autoapiclass and autoapimethod do not render returntype in the signature.
I wish to use autoapi to :
- generate documentation for a set of .pyi stub files
- add manual How To & Why documentation pages using autodoc style directives
I notice that all return types are absent when using autodocstyle directives and specifying autodoc_typehints = "signature"
for the same functions and classes the return types correctly documented by both autodoc and api_docs
Stranger still is that if I set autodoc_typehints = "both"
, the return type can be shown below the docstring. However I'd much prefer to use the 'signature stlye'
autoapi_autodoc style | autodoc* | autoapi api_docs |
---|---|---|
autodoc_typehints = "signature" | ditto | |
autodoc_typehints = "both" | ditto | |
Notes: The .pyi has been renamed to .py to enable plain autodoc. foo and foo_2 are identical
Is this a bug, or am I missing a configuration / value ? Repro can be found : https://github.com/Josverl/repro-autoapi-return-annotation