From 6d8430699ac65cfb08a62a6a6c006bf14df4660b Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 21 Mar 2023 21:33:44 +0100 Subject: [PATCH] [deprecation] 'check_single_file' replaced by 'check_single_file_item' --- doc/whatsnew/fragments/8478.internal | 4 ++++ pylint/lint/pylinter.py | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) create mode 100644 doc/whatsnew/fragments/8478.internal diff --git a/doc/whatsnew/fragments/8478.internal b/doc/whatsnew/fragments/8478.internal new file mode 100644 index 0000000000..b1b1585088 --- /dev/null +++ b/doc/whatsnew/fragments/8478.internal @@ -0,0 +1,4 @@ +Following a deprecation period, the ``check_single_file`` function of the +``Pylinter`` is replaced by ``Pylinter.check_single_file_item``. + +Refs #8478 diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index c784638650..314e3939d6 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -12,7 +12,6 @@ import sys import tokenize import traceback -import warnings from collections import defaultdict from collections.abc import Callable, Iterator, Sequence from io import TextIOWrapper @@ -714,15 +713,6 @@ def _get_asts( return ast_per_fileitem - def check_single_file(self, name: str, filepath: str, modname: str) -> None: - warnings.warn( - "In pylint 3.0, the checkers check_single_file function will be removed. " - "Use check_single_file_item instead.", - DeprecationWarning, - stacklevel=2, - ) - self.check_single_file_item(FileItem(name, filepath, modname)) - def check_single_file_item(self, file: FileItem) -> None: """Check single file item.