@@ -15,6 +15,8 @@ class BreakingChange(enum.Enum):
1515 MESSAGE_MADE_ENABLED_BY_DEFAULT = "{symbol} ({msgid}) was enabled by default"
1616 MESSAGE_MOVED_TO_EXTENSION = "{symbol} ({msgid}) was moved to {extension}"
1717 EXTENSION_REMOVED = "{extension} was removed"
18+ OPTION_REMOVED = "{option} option was removed"
19+ OPTION_BEHAVIOR_CHANGED = "{option} behavior changed: {description}"
1820 # This kind of upgrade is non-breaking but if we want to automatically upgrade it,
1921 # then we should use the message store and old_names values instead of duplicating
2022 # MESSAGE_RENAMED= "{symbol} ({msgid}) was renamed"
@@ -27,11 +29,14 @@ class Condition(enum.Enum):
2729 MESSAGE_IS_NOT_DISABLED = "{symbol} ({msgid}) is not disabled"
2830 EXTENSION_IS_LOADED = "{extension} is loaded"
2931 EXTENSION_IS_NOT_LOADED = "{extension} is not loaded"
32+ OPTION_IS_PRESENT = "{option} is present in configuration"
3033
3134
3235class Information (NamedTuple ):
33- msgid_or_symbol : str
34- extension : str | None
36+ msgid_or_symbol : str | None = None
37+ extension : str | None = None
38+ option : list [str ] | str | None = None
39+ description : str | None = None
3540
3641
3742class Solution (enum .Enum ):
@@ -49,6 +54,8 @@ class Solution(enum.Enum):
4954 DISABLE_MESSAGE_IMPLICITLY = (
5055 "{symbol} ({msgid}) should be removed from the 'enable' option"
5156 )
57+ REMOVE_OPTION = "Remove {option} from configuration"
58+ REVIEW_OPTION = "Review and adjust or remove {option}: {description}"
5259
5360
5461ConditionsToBeAffected = list [Condition ]
@@ -71,6 +78,23 @@ class Solution(enum.Enum):
7178 extension = "pylint.extensions.emptystring" ,
7279)
7380
81+ SUGGESTION_MODE_REMOVED = Information (
82+ option = "suggestion-mode" ,
83+ description = "This option is no longer used and should be removed" ,
84+ )
85+
86+ INVALID_NAME_CONST_BEHAVIOR = Information (
87+ option = ["const-rgx" , "const-naming-style" ],
88+ description = """\
89+ In 'invalid-name', module-level constants that are reassigned are now treated
90+ as variables and checked against ``--variable-rgx`` rather than ``--const-rgx``.
91+ Module-level lists, sets, and objects can pass against either regex.
92+
93+ You may need to adjust this option to match your naming conventions.
94+
95+ See the release notes for concrete examples: https://pylint.readthedocs.io/en/stable/whatsnew/4/4.0/index.html""" ,
96+ )
97+
7498CONFIGURATION_BREAKING_CHANGES : dict [str , list [BreakingChangeWithSolution ]] = {
7599 "2.14.0" : [
76100 (
@@ -94,4 +118,18 @@ class Solution(enum.Enum):
94118 [[Solution .REMOVE_EXTENSION , Solution .ENABLE_MESSAGE_EXPLICITLY ]],
95119 ),
96120 ],
121+ "4.0.0" : [
122+ (
123+ BreakingChange .OPTION_REMOVED ,
124+ SUGGESTION_MODE_REMOVED ,
125+ [Condition .OPTION_IS_PRESENT ],
126+ [[Solution .REMOVE_OPTION ]],
127+ ),
128+ (
129+ BreakingChange .OPTION_BEHAVIOR_CHANGED ,
130+ INVALID_NAME_CONST_BEHAVIOR ,
131+ [],
132+ [[Solution .REVIEW_OPTION ]],
133+ ),
134+ ],
97135}
0 commit comments