diff options
Diffstat (limited to 'doc/how_tos/transform_plugins.rst')
-rw-r--r-- | doc/how_tos/transform_plugins.rst | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/how_tos/transform_plugins.rst b/doc/how_tos/transform_plugins.rst index 30e057820..031faa0f1 100644 --- a/doc/how_tos/transform_plugins.rst +++ b/doc/how_tos/transform_plugins.rst @@ -66,10 +66,19 @@ Module, Class, Function etc. In our case we need to transform a class. It can be .. sourcecode:: python + from typing import TYPE_CHECKING + import astroid - def register(linter): - # Needed for registering the plugin. + if TYPE_CHECKING: + from pylint.lint import PyLinter + + + def register(linter: "PyLinter") -> None: + """This required method auto registers the checker during initialization. + + :param linter: The linter to register the checker to. + """ pass def transform(cls): |