@@ -275,10 +275,10 @@ def missing_colon_google_style_section(): # noqa: D406, D407
275
275
276
276
277
277
@expect (_D213 )
278
- @expect ("D417: Missing arguments in the docstring "
279
- "(argument(s) 'y' missing in "
280
- "'test_missing_args ' docstring)" )
281
- def test_missing_args (x = 1 , y = 2 ): # noqa: D406, D407
278
+ @expect ("D417: Missing argument descriptions in the docstring "
279
+ "(argument(s) y are missing descriptions in "
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
@@ -299,8 +299,8 @@ def test_method(self, test, another_test): # noqa: D213, D407
299
299
300
300
"""
301
301
302
- @expect ("D417: Missing arguments in the docstring "
303
- "(argument(s) ' test, y, z' missing in "
302
+ @expect ("D417: Missing argument descriptions in the docstring "
303
+ "(argument(s) test, y, z are missing descriptions in "
304
304
"'test_missing_args' docstring)" , arg_count = 4 )
305
305
def test_missing_args (self , test , x , y , z = 3 ): # noqa: D213, D407
306
306
"""Test a valid args section.
@@ -311,20 +311,21 @@ def test_missing_args(self, test, x, y, z=3): # noqa: D213, D407
311
311
"""
312
312
313
313
@classmethod
314
- @expect ("D417: Missing arguments in the docstring "
315
- "(argument(s) ' test, y, z' missing in "
314
+ @expect ("D417: Missing argument descriptions in the docstring "
315
+ "(argument(s) test, y, z are missing descriptions in "
316
316
"'test_missing_args_class_method' docstring)" , arg_count = 4 )
317
317
def test_missing_args_class_method (cls , test , x , y , z = 3 ): # noqa: D213, D407
318
318
"""Test a valid args section.
319
319
320
320
Args:
321
- x: Another parameter.
321
+ x: Another parameter. The parameter below is missing description.
322
+ y:
322
323
323
324
"""
324
325
325
326
@staticmethod
326
- @expect ("D417: Missing arguments in the docstring "
327
- "(argument(s) ' a, y, z' missing in "
327
+ @expect ("D417: Missing argument descriptions in the docstring "
328
+ "(argument(s) a, y, z are missing descriptions in "
328
329
"'test_missing_args_static_method' docstring)" , arg_count = 3 )
329
330
def test_missing_args_static_method (a , x , y , z = 3 ): # noqa: D213, D407
330
331
"""Test a valid args section.
@@ -333,3 +334,83 @@ def test_missing_args_static_method(a, x, y, z=3): # noqa: D213, D407
333
334
x: Another parameter.
334
335
335
336
"""
337
+
338
+
339
+ @expect (_D213 )
340
+ @expect ("D417: Missing argument descriptions in the docstring "
341
+ "(argument(s) y are missing descriptions in "
342
+ "'test_missing_numpy_args' docstring)" )
343
+ def test_missing_numpy_args (x = 1 , y = 2 ): # noqa: D406, D407
344
+ """Toggle the gizmo.
345
+
346
+ Parameters
347
+ ----------
348
+ x : int
349
+ The greatest integer.
350
+
351
+ """
352
+
353
+
354
+ class TestNumpy : # noqa: D203
355
+ """Test class."""
356
+
357
+ def test_method (self , test , another_test , x = 1 , y = 2 ): # noqa: D213, D407
358
+ """Test a valid args section.
359
+
360
+ Parameters
361
+ ----------
362
+ test, another_test
363
+ Some parameters without type.
364
+ x, y : int
365
+ Some integer parameters.
366
+
367
+ """
368
+
369
+ @expect ("D417: Missing argument descriptions in the docstring "
370
+ "(argument(s) test, y, z are missing descriptions in "
371
+ "'test_missing_args' docstring)" , arg_count = 4 )
372
+ def test_missing_args (self , test , x , y , z = 3 , t = 1 ): # noqa: D213, D407
373
+ """Test a valid args section.
374
+
375
+ Parameters
376
+ ----------
377
+ x, t : int
378
+ Some parameters.
379
+
380
+
381
+ """
382
+
383
+ @classmethod
384
+ @expect ("D417: Missing argument descriptions in the docstring "
385
+ "(argument(s) test, y, z are missing descriptions in "
386
+ "'test_missing_args_class_method' docstring)" , arg_count = 4 )
387
+ def test_missing_args_class_method (cls , test , x , y , z = 3 ): # noqa: D213, D407
388
+ """Test a valid args section.
389
+
390
+ Parameters
391
+ ----------
392
+ z
393
+ x
394
+ Another parameter. The parameters y, test below are
395
+ missing descriptions. The parameter z above is also missing
396
+ a description.
397
+ y
398
+ test
399
+
400
+ """
401
+
402
+ @staticmethod
403
+ @expect ("D417: Missing argument descriptions in the docstring "
404
+ "(argument(s) a, z are missing descriptions in "
405
+ "'test_missing_args_static_method' docstring)" , arg_count = 3 )
406
+ def test_missing_args_static_method (a , x , y , z = 3 , t = 1 ): # noqa: D213, D407
407
+ """Test a valid args section.
408
+
409
+ Parameters
410
+ ----------
411
+ x, y
412
+ Another parameter.
413
+ t : int
414
+ Yet another parameter.
415
+
416
+ """
0 commit comments