@@ -15,6 +15,8 @@ class BreakingChange(enum.Enum):
15
15
MESSAGE_MADE_ENABLED_BY_DEFAULT = "{symbol} ({msgid}) was enabled by default"
16
16
MESSAGE_MOVED_TO_EXTENSION = "{symbol} ({msgid}) was moved to {extension}"
17
17
EXTENSION_REMOVED = "{extension} was removed"
18
+ OPTION_REMOVED = "{option} option was removed"
19
+ OPTION_BEHAVIOR_CHANGED = "{option} behavior changed: {description}"
18
20
# This kind of upgrade is non-breaking but if we want to automatically upgrade it,
19
21
# then we should use the message store and old_names values instead of duplicating
20
22
# MESSAGE_RENAMED= "{symbol} ({msgid}) was renamed"
@@ -27,11 +29,14 @@ class Condition(enum.Enum):
27
29
MESSAGE_IS_NOT_DISABLED = "{symbol} ({msgid}) is not disabled"
28
30
EXTENSION_IS_LOADED = "{extension} is loaded"
29
31
EXTENSION_IS_NOT_LOADED = "{extension} is not loaded"
32
+ OPTION_IS_PRESENT = "{option} is present in configuration"
30
33
31
34
32
35
class 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
35
40
36
41
37
42
class Solution (enum .Enum ):
@@ -49,6 +54,8 @@ class Solution(enum.Enum):
49
54
DISABLE_MESSAGE_IMPLICITLY = (
50
55
"{symbol} ({msgid}) should be removed from the 'enable' option"
51
56
)
57
+ REMOVE_OPTION = "Remove {option} from configuration"
58
+ REVIEW_OPTION = "Review and adjust or remove {option}: {description}"
52
59
53
60
54
61
ConditionsToBeAffected = list [Condition ]
@@ -71,6 +78,23 @@ class Solution(enum.Enum):
71
78
extension = "pylint.extensions.emptystring" ,
72
79
)
73
80
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
+
74
98
CONFIGURATION_BREAKING_CHANGES : dict [str , list [BreakingChangeWithSolution ]] = {
75
99
"2.14.0" : [
76
100
(
@@ -94,4 +118,18 @@ class Solution(enum.Enum):
94
118
[[Solution .REMOVE_EXTENSION , Solution .ENABLE_MESSAGE_EXPLICITLY ]],
95
119
),
96
120
],
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
+ ],
97
135
}
0 commit comments