@@ -42,10 +42,13 @@ class Condition(enum.Enum):
4242 OPTION_IS_NOT_PRESENT = "{option} is not present in configuration"
4343
4444
45- class Information (NamedTuple ):
46- msgid_or_symbol : str | None = None
45+ class MessageInformation (NamedTuple ):
46+ msgid_or_symbol : str
4747 extension : str | None = None
48- option : list [str ] | str | None = None
48+
49+
50+ class OptionInformation (NamedTuple ):
51+ option : list [str ] | str
4952 description : str | None = None
5053 new_value : str | None = None
5154
@@ -76,18 +79,19 @@ class Solution(enum.Enum):
7679MultipleActionSolution = list [Solution ]
7780# Sometimes there's multiple solutions and the user needs to choose
7881Solutions = dict [Intention , MultipleActionSolution ]
82+ Information = MessageInformation | OptionInformation
7983BreakingChangeWithSolution = tuple [
8084 BreakingChange , Information , ConditionsToBeAffected , Solutions
8185]
8286
83- NO_SELF_USE = Information (
87+ NO_SELF_USE = MessageInformation (
8488 msgid_or_symbol = "no-self-use" , extension = "pylint.extensions.no_self_use"
8589)
8690CONFIGURATION_BREAKING_CHANGES : dict [str , list [BreakingChangeWithSolution ]] = {
8791 "2.7.3" : [
8892 (
8993 BreakingChange .OPTION_RENAMED ,
90- Information (
94+ OptionInformation (
9195 option = "extension-pkg-whitelist" ,
9296 new_value = "extension-pkg-allow-list" ,
9397 ),
@@ -109,7 +113,7 @@ class Solution(enum.Enum):
109113 "3.0.0" : [
110114 (
111115 BreakingChange .EXTENSION_REMOVED ,
112- Information (
116+ MessageInformation (
113117 msgid_or_symbol = "compare-to-zero" ,
114118 extension = "pylint.extensions.comparetozero" ,
115119 ),
@@ -123,7 +127,7 @@ class Solution(enum.Enum):
123127 ),
124128 (
125129 BreakingChange .EXTENSION_REMOVED ,
126- Information (
130+ MessageInformation (
127131 msgid_or_symbol = "compare-to-empty-string" ,
128132 extension = "pylint.extensions.emptystring" ,
129133 ),
@@ -139,7 +143,7 @@ class Solution(enum.Enum):
139143 "4.0.0" : [
140144 (
141145 BreakingChange .OPTION_REMOVED ,
142- Information (
146+ OptionInformation (
143147 option = "suggestion-mode" ,
144148 description = "This option is no longer used and should be removed" ,
145149 ),
@@ -150,7 +154,7 @@ class Solution(enum.Enum):
150154 ),
151155 (
152156 BreakingChange .OPTION_BEHAVIOR_CHANGED ,
153- Information (
157+ OptionInformation (
154158 option = ["const-rgx" , "const-naming-style" ],
155159 description = textwrap .dedent (
156160 """
0 commit comments