summaryrefslogtreecommitdiff
path: root/pylint/checkers/threading_checker.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/threading_checker.py')
-rw-r--r--pylint/checkers/threading_checker.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pylint/checkers/threading_checker.py b/pylint/checkers/threading_checker.py
index b7ba91d41..cedf46a9e 100644
--- a/pylint/checkers/threading_checker.py
+++ b/pylint/checkers/threading_checker.py
@@ -1,12 +1,17 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
+from typing import TYPE_CHECKING
+
from astroid import nodes
from pylint import interfaces
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages, safe_infer
+if TYPE_CHECKING:
+ from pylint.lint import PyLinter
+
class ThreadingChecker(BaseChecker):
"""Checks for threading module
@@ -50,6 +55,5 @@ class ThreadingChecker(BaseChecker):
self.add_message("useless-with-lock", node=node, args=qname)
-def register(linter):
- """required method to auto register this checker"""
+def register(linter: "PyLinter") -> None:
linter.register_checker(ThreadingChecker(linter))