Skip to content

Commit 4c59549

Browse files
Disable fixme for internal uses before we make it optional in #3512
1 parent e1769bd commit 4c59549

File tree

9 files changed

+16
-18
lines changed

9 files changed

+16
-18
lines changed

pylint/checkers/base_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def create_message_definition_from_tuple(
189189
warnings.filterwarnings("ignore", category=DeprecationWarning)
190190
if isinstance(self, (BaseTokenChecker, BaseRawFileChecker)):
191191
default_scope = WarningScope.LINE
192-
# TODO: 3.0: Remove deprecated if-statement # pylint: disable=fixme
192+
# TODO: 3.0: Remove deprecated if-statement
193193
elif implements(self, (IRawChecker, ITokenChecker)):
194194
warnings.warn( # pragma: no cover
195195
"Checkers should subclass BaseTokenChecker or BaseRawFileChecker"

pylint/config/arguments_provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class UnsupportedAction(Exception):
2020
"""Raised by set_option when it doesn't know what to do for an action."""
2121

2222
def __init__(self, *args: object) -> None:
23-
# TODO: 3.0: Remove deprecated exception # pylint: disable=fixme
23+
# TODO: 3.0: Remove deprecated exception
2424
warnings.warn(
2525
"UnsupportedAction has been deprecated and will be removed in pylint 3.0",
2626
DeprecationWarning,
@@ -50,7 +50,7 @@ def __init__(self, arguments_manager: _ArgumentsManager) -> None:
5050

5151
@property
5252
def level(self) -> int:
53-
# TODO: 3.0: Remove deprecated attribute # pylint: disable=fixme
53+
# TODO: 3.0: Remove deprecated attribute
5454
warnings.warn(
5555
"The level attribute has been deprecated. It was used to display the checker in the help or not,"
5656
" and everything is displayed in the help now. It will be removed in pylint 3.0.",
@@ -60,7 +60,7 @@ def level(self) -> int:
6060

6161
@level.setter
6262
def level(self, value: int) -> None:
63-
# TODO: 3.0: Remove deprecated attribute # pylint: disable=fixme
63+
# TODO: 3.0: Remove deprecated attribute
6464
warnings.warn(
6565
"Setting the level attribute has been deprecated. It was used to display the checker in the help or not,"
6666
" and everything is displayed in the help now. It will be removed in pylint 3.0.",
@@ -70,7 +70,7 @@ def level(self, value: int) -> None:
7070

7171
@property
7272
def config(self) -> argparse.Namespace:
73-
# TODO: 3.0: Remove deprecated attribute # pylint: disable=fixme
73+
# TODO: 3.0: Remove deprecated attribute
7474
warnings.warn(
7575
"The checker-specific config attribute has been deprecated. Please use "
7676
"'linter.config' to access the global configuration object.",
@@ -124,7 +124,7 @@ def option_value(self, opt: str) -> Any: # pragma: no cover
124124
# pylint: disable-next=unused-argument
125125
def set_option(self, optname, value, action=None, optdict=None): # pragma: no cover
126126
"""DEPRECATED: Method called to set an option (registered in the options list)."""
127-
# TODO: 3.0: Remove deprecated method. # pylint: disable=fixme
127+
# TODO: 3.0: Remove deprecated method.
128128
warnings.warn(
129129
"set_option has been deprecated. You can use _arguments_manager.set_option "
130130
"or linter.set_option to set options on the global configuration object.",

pylint/config/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Option(optparse.Option):
172172
TYPE_CHECKER["py_version"] = _py_version_validator
173173

174174
def __init__(self, *opts, **attrs):
175-
# TODO: 3.0: Remove deprecated class # pylint: disable=fixme
175+
# TODO: 3.0: Remove deprecated class
176176
warnings.warn(
177177
"Option has been deprecated and will be removed in pylint 3.0",
178178
DeprecationWarning,

pylint/config/option_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _level_options(group, outputlevel):
1919

2020
class OptionParser(optparse.OptionParser):
2121
def __init__(self, option_class, *args, **kwargs):
22-
# TODO: 3.0: Remove deprecated class # pylint: disable=fixme
22+
# TODO: 3.0: Remove deprecated class
2323
warnings.warn(
2424
"OptionParser has been deprecated and will be removed in pylint 3.0",
2525
DeprecationWarning,

pylint/lint/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _worker_check_single_file(
5656
file_item: FileItem,
5757
) -> tuple[
5858
int,
59-
# TODO: 3.0: Make this only str after deprecation has been removed # pylint: disable=fixme
59+
# TODO: 3.0: Make this only str after deprecation has been removed
6060
str | None,
6161
str,
6262
str | None,

pylint/lint/pylinter.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ def __init__(
235235
options: Options = (),
236236
reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
237237
option_groups: tuple[tuple[str, str], ...] = (),
238-
# pylint: disable-next=fixme
239238
# TODO: Deprecate passing the pylintrc parameter
240239
pylintrc: str | None = None, # pylint: disable=unused-argument
241240
) -> None:
@@ -314,7 +313,7 @@ def __init__(
314313

315314
@property
316315
def option_groups(self) -> tuple[tuple[str, str], ...]:
317-
# TODO: 3.0: Remove deprecated attribute # pylint: disable=fixme
316+
# TODO: 3.0: Remove deprecated attribute
318317
warnings.warn(
319318
"The option_groups attribute has been deprecated and will be removed in pylint 3.0",
320319
DeprecationWarning,
@@ -706,7 +705,6 @@ def check(self, files_or_modules: Sequence[str] | str) -> None:
706705
"""
707706
self.initialize()
708707
if not isinstance(files_or_modules, (list, tuple)):
709-
# pylint: disable-next=fixme
710708
# TODO: 3.0: Remove deprecated typing and update docstring
711709
warnings.warn(
712710
"In pylint 3.0, the checkers check function will only accept sequence of string",
@@ -871,7 +869,7 @@ def set_current_module(
871869
return
872870
self.reporter.on_set_current_module(modname or "", filepath)
873871
if modname is None:
874-
# TODO: 3.0: Remove all modname or ""'s in this method # pylint: disable=fixme
872+
# TODO: 3.0: Remove all modname or ""'s in this method
875873
warnings.warn(
876874
(
877875
"In pylint 3.0 modname should be a string so that it can be used to "
@@ -899,7 +897,7 @@ def _astroid_module_checker(
899897
for c in _checkers
900898
if isinstance(c, checkers.BaseTokenChecker) and c is not self
901899
]
902-
# TODO: 3.0: Remove deprecated for-loop # pylint: disable=fixme
900+
# TODO: 3.0: Remove deprecated for-loop
903901
for c in _checkers:
904902
with warnings.catch_warnings():
905903
warnings.filterwarnings("ignore", category=DeprecationWarning)
@@ -918,7 +916,7 @@ def _astroid_module_checker(
918916
rawcheckers = [
919917
c for c in _checkers if isinstance(c, checkers.BaseRawFileChecker)
920918
]
921-
# TODO: 3.0: Remove deprecated if-statement # pylint: disable=fixme
919+
# TODO: 3.0: Remove deprecated if-statement
922920
for c in _checkers:
923921
with warnings.catch_warnings():
924922
warnings.filterwarnings("ignore", category=DeprecationWarning)
@@ -1006,7 +1004,7 @@ def check_astroid_module(
10061004
ast_node, walker, rawcheckers, tokencheckers
10071005
)
10081006

1009-
# TODO: 3.0: Remove unnecessary assertion # pylint: disable=fixme
1007+
# TODO: 3.0: Remove unnecessary assertion
10101008
assert self.current_name
10111009

10121010
self.stats.by_module[self.current_name]["statement"] = (

pylint/testutils/unittest_linter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def add_message(
3838
self,
3939
msgid: str,
4040
line: int | None = None,
41-
# pylint: disable=fixme
4241
# TODO: Make node non optional
4342
node: nodes.NodeNG | None = None,
4443
args: Any = None,

pylintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ disable=
104104
too-few-public-methods,
105105
# handled by black
106106
format,
107+
# We anticipate #3512 where it will become optional
108+
fixme,
107109

108110

109111
[REPORTS]

tests/test_self.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def test_parallel_execution(self) -> None:
253253
def test_parallel_execution_missing_arguments(self) -> None:
254254
self._runtest(["-j 2", "not_here", "not_here_too"], code=1)
255255

256-
# pylint: disable-next=fixme
257256
# TODO: PY3.7: Turn off abbreviations in ArgumentsManager after 3.7 support has been dropped
258257
# argparse changed behaviour with abbreviations on/off in 3.8+ so we can't
259258
@pytest.mark.xfail

0 commit comments

Comments
 (0)