Document the return type when translating Doxygen @return to Python.
In addition to translating the comment itself, also document the type of the object returned. This is consistent with generating not only :param: but also :type: for the parameters documented using @param.
This commit is contained in:
parent
1f826b0925
commit
6aa9cd37a5
4 changed files with 49 additions and 22 deletions
|
|
@ -13,6 +13,7 @@ commentVerifier.check(doxygen_basic_translate.function.__doc__,
|
|||
|
||||
Author: Some author
|
||||
|
||||
:rtype: int
|
||||
:return: Some number
|
||||
|
||||
See also: function2
|
||||
|
|
@ -86,6 +87,7 @@ commentVerifier.check(doxygen_basic_translate.Atan2.__doc__,
|
|||
:param y: Vertical coordinate.
|
||||
:type x: float
|
||||
:param x: Horizontal coordinate.
|
||||
:rtype: float
|
||||
:return: Arc tangent of ``y/x``.
|
||||
"""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -263,10 +263,13 @@ r"""
|
|||
|
||||
Another remarks section
|
||||
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
|
||||
:rtype: int
|
||||
:return: it
|
||||
|
||||
:rtype: int
|
||||
:return: may return
|
||||
|
||||
""")
|
||||
|
|
|
|||
|
|
@ -99,10 +99,13 @@ r"""
|
|||
|
||||
Another remarks section
|
||||
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
|
||||
:rtype: int
|
||||
:return: it
|
||||
|
||||
:rtype: int
|
||||
:return: may return
|
||||
|
||||
See also: someOtherMethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue