Closes #1670: Fix napoleon handling of *args and **kwargs parameters

This commit is contained in:
Rob Ruana
2015-01-12 17:08:51 -05:00
parent dee3e60ee6
commit 9df7b53782
2 changed files with 52 additions and 2 deletions
+42
View File
@@ -155,6 +155,26 @@ class GoogleDocstringTest(BaseDocstringTest):
:returns: Extended
description of return value"""
), (
"""
Single line summary
Args:
arg1(str):Extended
description of arg1
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
""",
"""
Single line summary
:Parameters: * **arg1** (*str*) --
Extended
description of arg1
* **\\*args** --
Variable length argument list.
* **\\*\\*kwargs** --
Arbitrary keyword arguments."""
)]
def test_docstrings(self):
@@ -335,6 +355,28 @@ class NumpyDocstringTest(BaseDocstringTest):
:returns: *str* --
Extended
description of return value"""
), (
"""
Single line summary
Parameters
----------
arg1:str
Extended description of arg1
*args:
Variable length argument list.
**kwargs:
Arbitrary keyword arguments.
""",
"""
Single line summary
:Parameters: * **arg1** (*str*) --
Extended description of arg1
* ***args** --
Variable length argument list.
* ****kwargs** --
Arbitrary keyword arguments."""
)]
def test_docstrings(self):