@@ -277,8 +277,8 @@ def missing_colon_google_style_section(): # noqa: D406, D407
277
277
@expect (_D213 )
278
278
@expect ("D417: Missing arguments in the docstring "
279
279
"(argument(s) 'y' missing in "
280
- "'test_missing_args ' docstring)" )
281
- def test_missing_args (x = 1 , y = 2 ): # noqa: D406, D407
280
+ "'test_missing_google_args ' docstring)" )
281
+ def test_missing_google_args (x = 1 , y = 2 ): # noqa: D406, D407
282
282
"""Toggle the gizmo.
283
283
284
284
Args:
@@ -287,7 +287,7 @@ def test_missing_args(x=1, y=2): # noqa: D406, D407
287
287
"""
288
288
289
289
290
- class Test : # noqa: D203
290
+ class TestGoogle : # noqa: D203
291
291
"""Test class."""
292
292
293
293
def test_method (self , test , another_test ): # noqa: D213, D407
@@ -333,3 +333,78 @@ def test_missing_args_static_method(a, x, y, z=3): # noqa: D213, D407
333
333
x: Another parameter.
334
334
335
335
"""
336
+
337
+
338
+ @expect (_D213 )
339
+ @expect ("D417: Missing arguments in the docstring "
340
+ "(argument(s) 'y' missing in "
341
+ "'test_missing_numpy_args' docstring)" )
342
+ def test_missing_numpy_args (x = 1 , y = 2 ): # noqa: D406, D407
343
+ """Toggle the gizmo.
344
+
345
+ Parameters
346
+ ----------
347
+ x : int
348
+ The greatest integer.
349
+
350
+ """
351
+
352
+
353
+ class TestNumpy : # noqa: D203
354
+ """Test class."""
355
+
356
+ def test_method (self , test , another_test , x = 1 , y = 2 ): # noqa: D213, D407
357
+ """Test a valid args section.
358
+
359
+ Parameters
360
+ ----------
361
+ test, another_test
362
+ Some parameters without type.
363
+ x, y : int
364
+ Some integer parameters.
365
+
366
+ """
367
+
368
+ @expect ("D417: Missing arguments in the docstring "
369
+ "(argument(s) 'test, y, z' missing in "
370
+ "'test_missing_args' docstring)" , arg_count = 4 )
371
+ def test_missing_args (self , test , x , y , z = 3 , t = 1 ): # noqa: D213, D407
372
+ """Test a valid args section.
373
+
374
+ Parameters
375
+ ----------
376
+ x, t : int
377
+ Some parameters.
378
+
379
+
380
+ """
381
+
382
+ @classmethod
383
+ @expect ("D417: Missing arguments in the docstring "
384
+ "(argument(s) 'test, y, z' missing in "
385
+ "'test_missing_args_class_method' docstring)" , arg_count = 4 )
386
+ def test_missing_args_class_method (cls , test , x , y , z = 3 ): # noqa: D213, D407
387
+ """Test a valid args section.
388
+
389
+ Parameters
390
+ ----------
391
+ x
392
+ Another parameter.
393
+
394
+ """
395
+
396
+ @staticmethod
397
+ @expect ("D417: Missing arguments in the docstring "
398
+ "(argument(s) 'a, z' missing in "
399
+ "'test_missing_args_static_method' docstring)" , arg_count = 3 )
400
+ def test_missing_args_static_method (a , x , y , z = 3 , t = 1 ): # noqa: D213, D407
401
+ """Test a valid args section.
402
+
403
+ Parameters
404
+ ----------
405
+ x, y
406
+ Another parameter.
407
+ t : int
408
+ Yet another parameter.
409
+
410
+ """
0 commit comments