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
Problem:
Unless I missed some configuration, property return typehints are not displayed in the output documentation with sphinx.ext.autodoc.
Suggestion:
As #7068 states, it is convenient to have properties being displayed the same as attributes.
It would be nice if the property return typehints were used as the type of the pseudo attributes.
Alternatives: #7385 tells about the :type: directive that we could use in the property docstrings but:
this is redundant information with the return typehint,
it does not display the same as attributes.
Example:
In the screenshot below:
time is an instance attribute with typehint: # type: TimeStats,
actions is a property with return typehint: # type: (...) -> ExecTotalStats,
steps is a property with return typehint: # type: (...) -> ExecTotalStats, plus a :type: ExecTotalStats in its docstring.
It would be nice if we had property lines ending with ": ExecTotalStats".
Adding a :type: ExecTotalStats directive in the steps property docstring does not display the information the same way as the time attribute.
Configuration:
sphinx-build version 3.0.4
use of the sphinx.ext.autodoc extension (sphix.ext.napoleon seems to behave the same for that concern)
The text was updated successfully, but these errors were encountered:
Problem:
Unless I missed some configuration, property return typehints are not displayed in the output documentation with sphinx.ext.autodoc.
Suggestion:
As #7068 states, it is convenient to have properties being displayed the same as attributes.
It would be nice if the property return typehints were used as the type of the pseudo attributes.
Alternatives:
#7385 tells about the
:type:
directive that we could use in the property docstrings but:Example:
In the screenshot below:
time
is an instance attribute with typehint:# type: TimeStats
,actions
is a property with return typehint:# type: (...) -> ExecTotalStats
,steps
is a property with return typehint:# type: (...) -> ExecTotalStats
, plus a:type: ExecTotalStats
in its docstring.It would be nice if we had property lines ending with ": ExecTotalStats".
Adding a
:type: ExecTotalStats
directive in thesteps
property docstring does not display the information the same way as thetime
attribute.Configuration:
The text was updated successfully, but these errors were encountered: