Skip to content

Commit 4f6a3a9

Browse files
Deprecate PyLinter pylintrc argument
1 parent 54d83b4 commit 4f6a3a9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The unused ``pylintrc`` argument to ``PyLinter.__init__()`` is deprecated
2+
and will be removed.
3+
4+
Refs #6052

pylint/lint/pylinter.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import sys
1313
import tokenize
1414
import traceback
15+
import warnings
1516
from collections import defaultdict
1617
from collections.abc import Callable, Iterable, Iterator, Sequence
1718
from io import TextIOWrapper
@@ -291,12 +292,18 @@ def __init__(
291292
options: Options = (),
292293
reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
293294
option_groups: tuple[tuple[str, str], ...] = (),
294-
# TODO: Deprecate passing the pylintrc parameter
295-
pylintrc: str | None = None, # pylint: disable=unused-argument
295+
pylintrc: str | None = None,
296296
) -> None:
297297
_ArgumentsManager.__init__(self, prog="pylint")
298298
_MessageStateHandler.__init__(self, self)
299299

300+
if pylintrc is not None:
301+
warnings.warn(
302+
"The pylintrc argument will be removed.",
303+
DeprecationWarning,
304+
stacklevel=2,
305+
)
306+
300307
# Some stuff has to be done before initialization of other ancestors...
301308
# messages store / checkers / reporter / astroid manager
302309

0 commit comments

Comments
 (0)