summaryrefslogtreecommitdiff
path: root/pylint/extensions/empty_comment.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/extensions/empty_comment.py')
-rw-r--r--pylint/extensions/empty_comment.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pylint/extensions/empty_comment.py b/pylint/extensions/empty_comment.py
index 7b9841678..c52540308 100644
--- a/pylint/extensions/empty_comment.py
+++ b/pylint/extensions/empty_comment.py
@@ -1,8 +1,13 @@
+from typing import TYPE_CHECKING
+
from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.interfaces import IRawChecker
+if TYPE_CHECKING:
+ from pylint.lint import PyLinter
+
def is_line_commented(line):
"""Checks if a `# symbol that is not part of a string was found in line"""
@@ -54,5 +59,5 @@ class CommentChecker(BaseChecker):
self.add_message("empty-comment", line=line_num + 1)
-def register(linter):
+def register(linter: "PyLinter") -> None:
linter.register_checker(CommentChecker(linter))