@@ -195,11 +195,11 @@ def test_empty_docstring(self):
195195 def test_parameters (self , doctype , expected ):
196196 docstring = dedent (
197197 f"""
198- Parameters
199- ----------
200- a : { doctype }
201- b :
202- """
198+ Parameters
199+ ----------
200+ a : { doctype }
201+ b :
202+ """
203203 )
204204 transformer = DoctypeTransformer ()
205205 annotations = DocstringAnnotations (docstring , transformer = transformer )
@@ -216,11 +216,11 @@ def test_parameters(self, doctype, expected):
216216 def test_returns (self , doctypes , expected ):
217217 docstring = dedent (
218218 """
219- Returns
220- -------
221- a : {}
222- b : {}
223- """
219+ Returns
220+ -------
221+ a : {}
222+ b : {}
223+ """
224224 ).format (* doctypes )
225225 transformer = DoctypeTransformer ()
226226 annotations = DocstringAnnotations (docstring , transformer = transformer )
@@ -229,11 +229,11 @@ def test_returns(self, doctypes, expected):
229229 def test_duplicate_parameters (self , caplog ):
230230 docstring = dedent (
231231 """
232- Parameters
233- ----------
234- a : int
235- a : str
236- """
232+ Parameters
233+ ----------
234+ a : int
235+ a : str
236+ """
237237 )
238238 transformer = DoctypeTransformer ()
239239 annotations = DocstringAnnotations (docstring , transformer = transformer )
@@ -252,3 +252,19 @@ def test_duplicate_returns(self, caplog):
252252 transformer = DoctypeTransformer ()
253253 annotations = DocstringAnnotations (docstring , transformer = transformer )
254254 assert annotations .returns .value == "int"
255+
256+ def test_args_kwargs (self ):
257+ docstring = dedent (
258+ """
259+ Parameters
260+ ----------
261+ *args : int
262+ **kwargs : str
263+ """
264+ )
265+ transformer = DoctypeTransformer ()
266+ annotations = DocstringAnnotations (docstring , transformer = transformer )
267+ assert "args" in annotations .parameters
268+ assert "*args" not in annotations .parameters
269+ assert "kwargs" in annotations .parameters
270+ assert "**kargs" not in annotations .parameters
0 commit comments