@@ -70,24 +70,24 @@ See also :ref:`code_style checker's options' documentation <code_style-options>`
70
70
71
71
Code Style checker Messages
72
72
^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
+ :consider-using-namedtuple-or-dataclass (R6101): *Consider using namedtuple or dataclass for dictionary values *
74
+ Emitted when dictionary values can be replaced by namedtuples or dataclass
75
+ instances.
73
76
:consider-using-tuple (R6102): *Consider using an in-place tuple instead of list *
74
77
Only for style consistency! Emitted where an in-place defined ``list `` can be
75
78
replaced by a ``tuple ``. Due to optimizations by CPython, there is no
76
79
performance benefit from it.
77
- :consider-using-namedtuple-or-dataclass (R6101): *Consider using namedtuple or dataclass for dictionary values *
78
- Emitted when dictionary values can be replaced by namedtuples or dataclass
79
- instances.
80
- :prefer-typing-namedtuple (R6105): *Prefer 'typing.NamedTuple' over 'collections.namedtuple' *
81
- 'typing.NamedTuple' uses the well-known 'class' keyword with type-hints for
82
- readability (it's also faster as it avoids an internal exec call). Disabled
83
- by default!
84
80
:consider-using-assignment-expr (R6103): *Use '%s' instead *
85
81
Emitted when an if assignment is directly followed by an if statement and
86
82
both can be combined by using an assignment expression ``:= ``. Requires
87
83
Python 3.8 and ``py-version >= 3.8 ``.
88
84
:consider-using-augmented-assign (R6104): *Use '%s' to do an augmented assign directly *
89
85
Emitted when an assignment is referring to the object that it is assigning
90
86
to. This can be changed to be an augmented assign. Disabled by default!
87
+ :prefer-typing-namedtuple (R6105): *Prefer 'typing.NamedTuple' over 'collections.namedtuple' *
88
+ 'typing.NamedTuple' uses the well-known 'class' keyword with type-hints for
89
+ readability (it's also faster as it avoids an internal exec call). Disabled
90
+ by default!
91
91
92
92
93
93
.. _pylint.extensions.comparison_placement :
@@ -594,24 +594,14 @@ See also :ref:`parameter_documentation checker's options' documentation <paramet
594
594
595
595
Parameter Documentation checker Messages
596
596
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
597
- :differing-param-doc (W9017): *"%s" differing in parameter documentation *
598
- Please check parameter names in declarations.
599
- :differing-type-doc (W9018): *"%s" differing in parameter type documentation *
600
- Please check parameter names in type declarations.
601
597
:multiple-constructor-doc (W9005): *"%s" has constructor parameters documented in class and __init__ *
602
598
Please remove parameter declarations in the class or constructor.
603
- :missing-param-doc (W9015): *"%s" missing in parameter documentation *
604
- Please add parameter declarations for all parameters.
605
- :missing-type-doc (W9016): *"%s" missing in parameter type documentation *
606
- Please add parameter type declarations for all parameters.
607
599
:missing-raises-doc (W9006): *"%s" not documented as being raised *
608
600
Please document exceptions for all raised exception types.
609
- :useless-param-doc (W9019): *"%s" useless ignored parameter documentation *
610
- Please remove the ignored parameter documentation.
611
- :useless-type-doc (W9020): *"%s" useless ignored parameter type documentation *
612
- Please remove the ignored parameter type documentation.
613
- :missing-any-param-doc (W9021): *Missing any documentation in "%s" *
614
- Please add parameter and/or type documentation.
601
+ :redundant-returns-doc (W9008): *Redundant returns documentation *
602
+ Please remove the return/rtype documentation from this method.
603
+ :redundant-yields-doc (W9010): *Redundant yields documentation *
604
+ Please remove the yields documentation from this method.
615
605
:missing-return-doc (W9011): *Missing return documentation *
616
606
Please add documentation about what this method returns.
617
607
:missing-return-type-doc (W9012): *Missing return type documentation *
@@ -620,10 +610,20 @@ Parameter Documentation checker Messages
620
610
Please add documentation about what this generator yields.
621
611
:missing-yield-type-doc (W9014): *Missing yield type documentation *
622
612
Please document the type yielded by this method.
623
- :redundant-returns-doc (W9008): *Redundant returns documentation *
624
- Please remove the return/rtype documentation from this method.
625
- :redundant-yields-doc (W9010): *Redundant yields documentation *
626
- Please remove the yields documentation from this method.
613
+ :missing-param-doc (W9015): *"%s" missing in parameter documentation *
614
+ Please add parameter declarations for all parameters.
615
+ :missing-type-doc (W9016): *"%s" missing in parameter type documentation *
616
+ Please add parameter type declarations for all parameters.
617
+ :differing-param-doc (W9017): *"%s" differing in parameter documentation *
618
+ Please check parameter names in declarations.
619
+ :differing-type-doc (W9018): *"%s" differing in parameter type documentation *
620
+ Please check parameter names in type declarations.
621
+ :useless-param-doc (W9019): *"%s" useless ignored parameter documentation *
622
+ Please remove the ignored parameter documentation.
623
+ :useless-type-doc (W9020): *"%s" useless ignored parameter type documentation *
624
+ Please remove the ignored parameter type documentation.
625
+ :missing-any-param-doc (W9021): *Missing any documentation in "%s" *
626
+ Please add parameter and/or type documentation.
627
627
628
628
629
629
.. _pylint.extensions.redefined_loop_name :
@@ -691,12 +691,12 @@ Typing checker Messages
691
691
float ``. Using the shorthand for unions aligns with Python typing
692
692
recommendations, removes the need for imports, and avoids confusion in
693
693
function signatures.
694
- :unnecessary-default-type-args (R6007): *Type `%s` has unnecessary default type args. Change it to `%s`. *
695
- Emitted when types have default type args which can be omitted. Mainly used
696
- for `typing.Generator ` and `typing.AsyncGenerator `.
697
694
:redundant-typehint-argument (R6006): *Type `%s` is used more than once in union type annotation. Remove redundant typehints. *
698
695
Duplicated type arguments will be skipped by `mypy ` tool, therefore should be
699
696
removed to avoid confusion.
697
+ :unnecessary-default-type-args (R6007): *Type `%s` has unnecessary default type args. Change it to `%s`. *
698
+ Emitted when types have default type args which can be omitted. Mainly used
699
+ for `typing.Generator ` and `typing.AsyncGenerator `.
700
700
701
701
702
702
.. _pylint.extensions.while_used :
0 commit comments