Skip to content

Commit 6d84306

Browse files
[deprecation] 'check_single_file' replaced by 'check_single_file_item'
1 parent d659575 commit 6d84306

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

doc/whatsnew/fragments/8478.internal

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Following a deprecation period, the ``check_single_file`` function of the
2+
``Pylinter`` is replaced by ``Pylinter.check_single_file_item``.
3+
4+
Refs #8478

pylint/lint/pylinter.py

-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import sys
1313
import tokenize
1414
import traceback
15-
import warnings
1615
from collections import defaultdict
1716
from collections.abc import Callable, Iterator, Sequence
1817
from io import TextIOWrapper
@@ -714,15 +713,6 @@ def _get_asts(
714713

715714
return ast_per_fileitem
716715

717-
def check_single_file(self, name: str, filepath: str, modname: str) -> None:
718-
warnings.warn(
719-
"In pylint 3.0, the checkers check_single_file function will be removed. "
720-
"Use check_single_file_item instead.",
721-
DeprecationWarning,
722-
stacklevel=2,
723-
)
724-
self.check_single_file_item(FileItem(name, filepath, modname))
725-
726716
def check_single_file_item(self, file: FileItem) -> None:
727717
"""Check single file item.
728718

0 commit comments

Comments
 (0)