diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-03-21 21:52:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 20:52:30 +0000 |
commit | 81520adbb25a91c145af81aa9693ce9aa3d50c28 (patch) | |
tree | f527b32787eb0b8d7783d16618902bec0c07b4cc | |
parent | d6595750c67f9101b842291ed44bafde7b065bd8 (diff) | |
download | pylint-git-81520adbb25a91c145af81aa9693ce9aa3d50c28.tar.gz |
[deprecation] 'check_single_file' replaced by 'check_single_file_item' (#8478)
-rw-r--r-- | doc/whatsnew/fragments/8478.internal | 4 | ||||
-rw-r--r-- | pylint/lint/pylinter.py | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/doc/whatsnew/fragments/8478.internal b/doc/whatsnew/fragments/8478.internal new file mode 100644 index 000000000..b1b158508 --- /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 c78463865..314e3939d 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -12,7 +12,6 @@ import os 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 @@ class PyLinter( 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. |