diff options
Diffstat (limited to 'pylint/checkers/async.py')
-rw-r--r-- | pylint/checkers/async.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pylint/checkers/async.py b/pylint/checkers/async.py index 9aaead7c4..4a5c6abf2 100644 --- a/pylint/checkers/async.py +++ b/pylint/checkers/async.py @@ -11,6 +11,7 @@ """Checker for anything related to the async protocol (PEP 492).""" import sys +from typing import TYPE_CHECKING import astroid from astroid import nodes @@ -19,6 +20,9 @@ from pylint import checkers, interfaces, utils from pylint.checkers import utils as checker_utils from pylint.checkers.utils import decorated_with +if TYPE_CHECKING: + from pylint.lint import PyLinter + class AsyncChecker(checkers.BaseChecker): __implements__ = interfaces.IAstroidChecker @@ -94,6 +98,5 @@ class AsyncChecker(checkers.BaseChecker): ) -def register(linter): - """required method to auto register this checker""" +def register(linter: "PyLinter") -> None: linter.register_checker(AsyncChecker(linter)) |