autodoc_typehints='description'
doesn't suppress signature type hints for classes/methods
#7435
Labels
Milestone
Describe the bug
For functions,
autodoc_typehints='description'
prevents the type hints from being included in the signature in the generated documentation, but for methods and classes it doesn't. This is becauseFunctionDocumenter.format_args
does:But
ClassDocumenter.format_args
andMethodDocumenter.format_args
do only:To Reproduce
Expected behavior
autodoc_typehints='description'
doesn't put type hints into the signature; onlyautodoc_typehints='signature'
does.Environment info
Additional context
The generated reST from the above reproducer is:
Note that the
py:class
andpy:method
have type hints in the signature, but thepy:function
doesn't.The text was updated successfully, but these errors were encountered: