Skip to content

Commit dc11223

Browse files
[todos] Fix the todos version and the warnings' text (#9202) (#9204)
(cherry picked from commit 5546fe8) Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 0273db7 commit dc11223

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

pylint/checkers/similar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def process_module(self, node: nodes.Module) -> None:
839839
stream must implement the readlines method
840840
"""
841841
if self.linter.current_name is None:
842-
# TODO: 3.0 Fix current_name
842+
# TODO: 4.0 Fix current_name
843843
warnings.warn(
844844
(
845845
"In pylint 3.0 the current_name attribute of the linter object should be a string. "

pylint/checkers/variables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ def _loopvar_name(self, node: astroid.Name) -> None:
25712571
else_stmt, (nodes.Return, nodes.Raise, nodes.Break, nodes.Continue)
25722572
):
25732573
return
2574-
# TODO: 3.0: Consider using RefactoringChecker._is_function_def_never_returning
2574+
# TODO: 4.0: Consider using RefactoringChecker._is_function_def_never_returning
25752575
if isinstance(else_stmt, nodes.Expr) and isinstance(
25762576
else_stmt.value, nodes.Call
25772577
):

pylint/config/callback_actions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def __call__(
243243
values: str | Sequence[Any] | None,
244244
option_string: str | None = "--generate-rcfile",
245245
) -> None:
246-
# TODO: 3.x: Deprecate this after the auto-upgrade functionality of
246+
# TODO: 4.x: Deprecate this after the auto-upgrade functionality of
247247
# pylint-config is sufficient.
248248
self.run.linter._generate_config(skipsections=("Commands",))
249249
sys.exit(0)

pylint/config/config_initialization.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ def _config_initialization(
110110
"unrecognized-option", args=unrecognized_options_message, line=0
111111
)
112112

113-
# TODO 3.1: Change this to emit unknown-option-value
113+
# TODO: Change this to be checked only when upgrading the configuration
114114
for exc_name in linter.config.overgeneral_exceptions:
115115
if "." not in exc_name:
116116
warnings.warn_explicit(
117117
f"'{exc_name}' is not a proper value for the 'overgeneral-exceptions' option. "
118118
f"Use fully qualified name (maybe 'builtins.{exc_name}' ?) instead. "
119-
"This will cease to be checked at runtime in 3.1.0.",
119+
"This will cease to be checked at runtime when the configuration "
120+
"upgrader is released.",
120121
category=UserWarning,
121122
filename="pylint: Command line or configuration file",
122123
lineno=1,

pylint/testutils/functional/test_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class FunctionalTestFile:
5656
def __init__(self, directory: str, filename: str) -> None:
5757
self._directory = directory
5858
self.base = filename.replace(".py", "")
59-
# TODO: 3.0: Deprecate FunctionalTestFile.options and related code
59+
# TODO:4.0: Deprecate FunctionalTestFile.options and related code
6060
# We should just parse these options like a normal configuration file.
6161
self.options: TestFileOptions = {
6262
"min_pyver": (2, 5),

pylint/utils/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def format_section(
315315
) -> None:
316316
"""Format an option's section using the INI format."""
317317
warnings.warn(
318-
"format_section has been deprecated. It will be removed in pylint 3.0.",
318+
"format_section has been deprecated. It will be removed in pylint 4.0.",
319319
DeprecationWarning,
320320
stacklevel=2,
321321
)
@@ -330,7 +330,7 @@ def format_section(
330330
def _ini_format(stream: TextIO, options: list[tuple[str, OptionDict, Any]]) -> None:
331331
"""Format options using the INI format."""
332332
warnings.warn(
333-
"_ini_format has been deprecated. It will be removed in pylint 3.0.",
333+
"_ini_format has been deprecated. It will be removed in pylint 4.0.",
334334
DeprecationWarning,
335335
stacklevel=2,
336336
)

tests/test_check_parallel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_linter_with_unpickleable_plugins_is_pickleable(self) -> None:
269269
linter.load_plugin_modules(["pylint.extensions.overlapping_exceptions"])
270270
try:
271271
dill.dumps(linter)
272-
# TODO: 3.0: Fix this test by raising this assertion again
272+
# TODO: 4.0: Fix this test by raising this assertion again
273273
# raise AssertionError(
274274
# "Plugins loaded were pickle-safe! This test needs altering"
275275
# )

0 commit comments

Comments
 (0)