@@ -208,7 +208,7 @@ def mode(self, axis, numeric_only):
208
208
209
209
.. versionchanged:: 0.1.2
210
210
211
- numeric_only : boolean
211
+ numeric_only : bool
212
212
Sentence ending in period, followed by multiple directives.
213
213
214
214
.. versionadded:: 0.1.2
@@ -455,6 +455,50 @@ def blank_lines(self, kind):
455
455
"""
456
456
pass
457
457
458
+ def integer_parameter (self , kind ):
459
+ """
460
+ Uses integer instead of int.
461
+
462
+ Parameters
463
+ ----------
464
+ kind : integer
465
+ Foo bar baz.
466
+ """
467
+ pass
468
+
469
+ def string_parameter (self , kind ):
470
+ """
471
+ Uses string instead of str.
472
+
473
+ Parameters
474
+ ----------
475
+ kind : string
476
+ Foo bar baz.
477
+ """
478
+ pass
479
+
480
+ def boolean_parameter (self , kind ):
481
+ """
482
+ Uses boolean instead of bool.
483
+
484
+ Parameters
485
+ ----------
486
+ kind : boolean
487
+ Foo bar baz.
488
+ """
489
+ pass
490
+
491
+ def list_incorrect_parameter_type (self , kind ):
492
+ """
493
+ Uses list of boolean instead of list of bool.
494
+
495
+ Parameters
496
+ ----------
497
+ kind : list of boolean, integer, float or string
498
+ Foo bar baz.
499
+ """
500
+ pass
501
+
458
502
459
503
class BadReturns (object ):
460
504
@@ -590,6 +634,18 @@ def test_bad_generic_functions(self, func):
590
634
('Parameter "kind" description should finish with "."' ,)),
591
635
('BadParameters' , 'parameter_capitalization' ,
592
636
('Parameter "kind" description should start with a capital letter' ,)),
637
+ ('BadParameters' , 'integer_parameter' ,
638
+ ('Parameter "kind" type should use "int" instead of "integer"' ,)),
639
+ ('BadParameters' , 'string_parameter' ,
640
+ ('Parameter "kind" type should use "str" instead of "string"' ,)),
641
+ ('BadParameters' , 'boolean_parameter' ,
642
+ ('Parameter "kind" type should use "bool" instead of "boolean"' ,)),
643
+ ('BadParameters' , 'list_incorrect_parameter_type' ,
644
+ ('Parameter "kind" type should use "bool" instead of "boolean"' ,)),
645
+ ('BadParameters' , 'list_incorrect_parameter_type' ,
646
+ ('Parameter "kind" type should use "int" instead of "integer"' ,)),
647
+ ('BadParameters' , 'list_incorrect_parameter_type' ,
648
+ ('Parameter "kind" type should use "str" instead of "string"' ,)),
593
649
pytest .param ('BadParameters' , 'blank_lines' , ('No error yet?' ,),
594
650
marks = pytest .mark .xfail ),
595
651
# Returns tests
0 commit comments