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
{{ message }}
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.
The Numpy docstring style while using annotations indicates that the return type must be duplicated in the docstring to comply with the NumPy docstring style.
While I understand the necessity from a docstring parsing standpoint, it seems that the duplication introduce a significant amount of overhead. With that in mind, I'm wondering if it would not make sense to have a custom directive that would make the return type inherit directly from the return annotation or any mechanism that would avoid the duplication.
Cheers,
Thomas
The text was updated successfully, but these errors were encountered:
A new option napoleon_omit_rtype = True (default False) could render this to
:returns: Information about the return type
Current behavior, using napolen_use_rtpye=False and napoleon_preprocess_types = False gives
:returns: *Information about the return type*
which always renders the narrative information in italics.
An option napoleon_omit_rtype would immediately improve compatibility to sphinx-autodoc-typehints, which will take care of adding the correct :rtype: based on the type annotations.
Hi,
The Numpy docstring style while using annotations indicates that the return type must be duplicated in the docstring to comply with the NumPy docstring style.
While I understand the necessity from a docstring parsing standpoint, it seems that the duplication introduce a significant amount of overhead. With that in mind, I'm wondering if it would not make sense to have a custom directive that would make the return type inherit directly from the return annotation or any mechanism that would avoid the duplication.
Cheers,
Thomas
The text was updated successfully, but these errors were encountered: