Closed dadadel closed 3 years ago
If a type is provided in a reST dosctring for a parameter, it will be removed in the output docstring if not present in the type hint:
def func(param1): """Description :param param1: :type param1: str :returns: the return value """ pass
Will produce:
# Patch generated by Pyment v0.4.0dev --- a/t.py +++ b/t.py @@ -1,8 +1,7 @@ def func(param1): """Description - :param param1: - :type param1: str + :param param1: :returns: the return value """
However it works well when input docstring is google style:
def func(param1): """Description Args: param1(str): Returns: the return value """ pass
Produces:
# Patch generated by Pyment v0.4.0dev --- a/t2.py +++ b/t2.py @@ -1,11 +1,9 @@ def func(param1): """Description - Args: - param1(str): - - Returns: - the return value + :param param1: + :type param1: str + :returns: the return value """ pass
If a type is provided in a reST dosctring for a parameter, it will be removed in the output docstring if not present in the type hint:
Will produce:
However it works well when input docstring is google style:
Produces: