77from __future__ import annotations
88
99import enum
10+ import textwrap
1011from typing import NamedTuple
1112
1213
@@ -78,31 +79,6 @@ class Solution(enum.Enum):
7879NO_SELF_USE = Information (
7980 msgid_or_symbol = "no-self-use" , extension = "pylint.extensions.no_self_use"
8081)
81- COMPARE_TO_ZERO = Information (
82- msgid_or_symbol = "compare-to-zero" , extension = "pylint.extensions.comparetozero"
83- )
84- COMPARE_TO_EMPTY_STRING = Information (
85- msgid_or_symbol = "compare-to-empty-string" ,
86- extension = "pylint.extensions.emptystring" ,
87- )
88-
89- SUGGESTION_MODE_REMOVED = Information (
90- option = "suggestion-mode" ,
91- description = "This option is no longer used and should be removed" ,
92- )
93-
94- INVALID_NAME_CONST_BEHAVIOR = Information (
95- option = ["const-rgx" , "const-naming-style" ],
96- description = """\
97- In 'invalid-name', module-level constants that are reassigned are now treated
98- as variables and checked against ``--variable-rgx`` rather than ``--const-rgx``.
99- Module-level lists, sets, and objects can pass against either regex.
100-
101- You may need to adjust this option to match your naming conventions.
102-
103- See the release notes for concrete examples: https://pylint.readthedocs.io/en/stable/whatsnew/4/4.0/index.html""" ,
104- )
105-
10682CONFIGURATION_BREAKING_CHANGES : dict [str , list [BreakingChangeWithSolution ]] = {
10783 "2.14.0" : [
10884 (
@@ -118,7 +94,10 @@ class Solution(enum.Enum):
11894 "3.0.0" : [
11995 (
12096 BreakingChange .EXTENSION_REMOVED ,
121- COMPARE_TO_ZERO ,
97+ Information (
98+ msgid_or_symbol = "compare-to-zero" ,
99+ extension = "pylint.extensions.comparetozero" ,
100+ ),
122101 [Condition .MESSAGE_IS_NOT_DISABLED , Condition .EXTENSION_IS_LOADED ],
123102 {
124103 Intention .FIX_CONF : [
@@ -129,7 +108,10 @@ class Solution(enum.Enum):
129108 ),
130109 (
131110 BreakingChange .EXTENSION_REMOVED ,
132- COMPARE_TO_EMPTY_STRING ,
111+ Information (
112+ msgid_or_symbol = "compare-to-empty-string" ,
113+ extension = "pylint.extensions.emptystring" ,
114+ ),
133115 [Condition .MESSAGE_IS_NOT_DISABLED , Condition .EXTENSION_IS_LOADED ],
134116 {
135117 Intention .FIX_CONF : [
@@ -142,15 +124,31 @@ class Solution(enum.Enum):
142124 "4.0.0" : [
143125 (
144126 BreakingChange .OPTION_REMOVED ,
145- SUGGESTION_MODE_REMOVED ,
127+ Information (
128+ option = "suggestion-mode" ,
129+ description = "This option is no longer used and should be removed" ,
130+ ),
146131 [Condition .OPTION_IS_PRESENT ],
147132 {
148133 Intention .FIX_CONF : [Solution .REMOVE_OPTION ],
149134 },
150135 ),
151136 (
152137 BreakingChange .OPTION_BEHAVIOR_CHANGED ,
153- INVALID_NAME_CONST_BEHAVIOR ,
138+ Information (
139+ option = ["const-rgx" , "const-naming-style" ],
140+ description = textwrap .dedent (
141+ """
142+ In 'invalid-name', module-level constants that are reassigned are now treated
143+ as variables and checked against ``--variable-rgx`` rather than ``--const-rgx``.
144+ Module-level lists, sets, and objects can pass against either regex.
145+
146+ You may need to adjust this option to match your naming conventions.
147+
148+ See the release notes for concrete examples:
149+ https://pylint.readthedocs.io/en/stable/whatsnew/4/4.0/index.html""" ,
150+ ),
151+ ),
154152 [],
155153 {
156154 Intention .KEEP : [Solution .REVIEW_OPTION ],
0 commit comments