Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

autoapifunction, autoapiclass and autoapimethod do not render returntype in the signature. #473

Closed
Josverl opened this issue Aug 6, 2024 · 0 comments
Labels

Comments

@Josverl
Copy link

Josverl commented Aug 6, 2024

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
image image image
autodoc_typehints = "both" ditto
image image

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

@Josverl Josverl changed the title :autoapifunction::, .. autoapiclass:: and .. autoapimethod:: do not render returntype in the signature. autoapifunction, autoapiclass and autoapimethod do not render returntype in the signature. Aug 6, 2024
@AWhetter AWhetter added the Bug label Aug 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants