Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pylint/checkers/classes/special_methods_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _is_iterator(node):
# Generators can be iterated.
return True
# pylint: disable-next=fixme
# TODO: Should be covered by https://github.com/PyCQA/astroid/pull/1475
# TODO: 2.14: Should be covered by https://github.com/PyCQA/astroid/pull/1475
if isinstance(node, nodes.ComprehensionScope):
# Comprehensions can be iterated.
return True
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/similar.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def set_option(self, optname, value, action=None, optdict=None):
Overridden to report options setting to Similar
"""
# pylint: disable-next=fixme
# TODO: Deprecate the non required arguments
# TODO: Optparse: Deprecate the non required arguments
self.linter.set_option(optname, value)
if optname == "min-similarity-lines":
self.min_lines = self.linter.config.min_similarity_lines
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ def _supports_protocol(
return True

# pylint: disable-next=fixme
# TODO: Should be covered by https://github.com/PyCQA/astroid/pull/1475
# TODO: 2.14: Should be covered by https://github.com/PyCQA/astroid/pull/1475
if isinstance(value, nodes.ComprehensionScope):
return True

Expand Down
4 changes: 2 additions & 2 deletions pylint/config/arguments_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _load_default_argument_values(self) -> None:
def _parse_configuration_file(self, arguments: list[str]) -> None:
"""Parse the arguments found in a configuration file into the namespace."""
# pylint: disable-next=fixme
# TODO: This should parse_args instead of parse_known_args
# TODO: Optparse: This should parse_args instead of parse_known_args
self.config = self._arg_parser.parse_known_args(arguments, self.config)[0]

def _parse_command_line_configuration(
Expand Down Expand Up @@ -509,7 +509,7 @@ def read_config_file(
def _parse_toml(config_file: Path, parser: configparser.ConfigParser) -> None:
"""DEPRECATED: Parse and handle errors of a toml configuration file.

TODO: Remove after read_config_file has been removed.
TODO: 3.0: Remove depreacted method.
"""
with open(config_file, mode="rb") as fp:
content = tomllib.load(fp)
Expand Down
2 changes: 1 addition & 1 deletion pylint/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _convert_option_to_argument(
action = optdict.get("action", "store")

# pylint: disable-next=fixme
# TODO: Remove this handling after we have deprecated multiple-choice arguments
# TODO: Optparse: Remove this handling after we have deprecated multiple-choice arguments
choices = optdict.get("choices", None)
if opt == "confidence":
choices = None
Expand Down
2 changes: 1 addition & 1 deletion pylint/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

USER_HOME = os.path.expanduser("~")
# pylint: disable-next=fixme
# TODO Remove in 3.0 with all the surrounding code
# TODO: 3.0: Remove in 3.0 with all the surrounding code
OLD_DEFAULT_PYLINT_HOME = ".pylint.d"
DEFAULT_PYLINT_HOME = platformdirs.user_cache_dir("pylint")

Expand Down
4 changes: 2 additions & 2 deletions pylint/lint/pylinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def _parse_error_mode(self) -> None:
)

# pylint: disable-next=fixme
# TODO: Potentially remove after 'set_option' has been refactored
# TODO: Optparse: Potentially remove after 'set_option' has been refactored
self.set_option("reports", False)
self.set_option("persistent", False)
self.set_option("score", False)
Expand Down Expand Up @@ -1052,7 +1052,7 @@ def check(self, files_or_modules: Sequence[str] | str) -> None:
self.initialize()
if not isinstance(files_or_modules, (list, tuple)):
# pylint: disable-next=fixme
# TODO: Update typing and docstring for 'files_or_modules' when removing the deprecation
# TODO: 3.0: Remove deprecated typing and update docstring
warnings.warn(
"In pylint 3.0, the checkers check function will only accept sequence of string",
DeprecationWarning,
Expand Down
2 changes: 1 addition & 1 deletion pylint/lint/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Run:
@staticmethod
def _not_implemented_callback(*args, **kwargs):
# pylint: disable-next=fixme
# TODO: Remove after optparse has been deprecated
# TODO: Optparse: Remove after optparse has been deprecated
raise NotImplementedError

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion pylint/reporters/base_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def handle_message(self, msg: Message) -> None:
def set_output(self, output: TextIO | None = None) -> None:
"""Set output stream."""
# pylint: disable-next=fixme
# TODO: Remove this method after depreciation
# TODO: 3.0: Remove deprecated method
warn(
"'set_output' will be removed in 3.0, please use 'reporter.out = stream' instead",
DeprecationWarning,
Expand Down
4 changes: 2 additions & 2 deletions pylint/reporters/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def colorize_ansi(
:return: the ansi escaped string
"""
# pylint: disable-next=fixme
# TODO: Remove DeprecationWarning and only accept MessageStyle as parameter
# TODO: 3.0: Remove deprecated typing and only accept MessageStyle as parameter
if not isinstance(msg_style, MessageStyle):
warnings.warn(
"In pylint 3.0, the colorize_ansi function of Text reporters will only accept a MessageStyle parameter",
Expand Down Expand Up @@ -273,7 +273,7 @@ def __init__(
) -> None:
super().__init__(output)
# pylint: disable-next=fixme
# TODO: Remove DeprecationWarning and only accept ColorMappingDict as color_mapping parameter
# TODO: 3.0: Remove deprecated typing and only accept ColorMappingDict as color_mapping parameter
if color_mapping and not isinstance(
list(color_mapping.values())[0], MessageStyle
):
Expand Down
5 changes: 1 addition & 4 deletions pylint/testutils/checker_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ def setup_method(self):
self.checker = self.CHECKER_CLASS(self.linter)
for key, value in self.CONFIG.items():
setattr(self.checker.linter.config, key, value)
# pylint: disable-next=fixme
# TODO: Remove after deprecation of the config attribute
setattr(self.checker.config, key, value)
self.checker.open()

@contextlib.contextmanager
Expand Down Expand Up @@ -78,7 +75,7 @@ def assertAddsMessages(
assert expected_msg.col_offset == gotten_msg.col_offset, msg
if PY38_PLUS:
# pylint: disable=fixme
# TODO: Require end_line and end_col_offset and remove the warning
# TODO: 3.0: Remove deprecated missing arguments and remove the warning
if not expected_msg.end_line == gotten_msg.end_line:
warnings.warn( # pragma: no cover
f"The end_line attribute of {gotten_msg} does not match "
Expand Down
2 changes: 1 addition & 1 deletion pylint/testutils/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _wrapper(fun):
def _forward(self, *args, **test_function_kwargs):
"""Set option via argparse."""
# pylint: disable-next=fixme
# TODO: Revisit this decorator after all checkers have switched
# TODO: Optparse: Revisit this decorator after all checkers have switched
options = []
for key, value in kwargs.items():
options += [f"--{key.replace('_', '-')}", _parse_rich_type_value(value)]
Expand Down
2 changes: 1 addition & 1 deletion pylint/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def _comment(string: str) -> str:
def _format_option_value(optdict, value):
"""Return the user input's value from a 'compiled' value.

TODO: Remove in pylint 3.0.
TODO: 3.0: Remove deprecated function
"""
if optdict.get("type", None) == "py_version":
value = ".".join(str(item) for item in value)
Expand Down