summaryrefslogtreecommitdiff
path: root/pylint/checkers/threading_checker.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-04-21 14:43:38 +0200
committerGitHub <noreply@github.com>2022-04-21 14:43:38 +0200
commite931d022e5637f8a426343b132d3259bd5245c50 (patch)
tree4e683be72a7e233c96e3873558316d58b4b3adb6 /pylint/checkers/threading_checker.py
parent629b16125ab889e238108fd68f0ec248435bde23 (diff)
downloadpylint-git-e931d022e5637f8a426343b132d3259bd5245c50.tar.gz
Migrate from 'check_messages' to 'only_required_for_messages' (#6417)
Diffstat (limited to 'pylint/checkers/threading_checker.py')
-rw-r--r--pylint/checkers/threading_checker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/threading_checker.py b/pylint/checkers/threading_checker.py
index 3b0af7011..308b6ca26 100644
--- a/pylint/checkers/threading_checker.py
+++ b/pylint/checkers/threading_checker.py
@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
from astroid import nodes
from pylint.checkers import BaseChecker
-from pylint.checkers.utils import check_messages, safe_infer
+from pylint.checkers.utils import only_required_for_messages, safe_infer
if TYPE_CHECKING:
from pylint.lint import PyLinter
@@ -42,7 +42,7 @@ class ThreadingChecker(BaseChecker):
),
}
- @check_messages("useless-with-lock")
+ @only_required_for_messages("useless-with-lock")
def visit_with(self, node: nodes.With) -> None:
context_managers = (c for c, _ in node.items if isinstance(c, nodes.Call))