diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-02-12 12:39:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-12 12:39:21 +0100 |
commit | 81ed650d4655f65231d9caa0056dc92b0fcc257d (patch) | |
tree | d60890107d1304a9e8099a4d97e729b26d7b8ff7 /examples | |
parent | a0b28f9019fabddd8ef428be75659082377abb4c (diff) | |
download | pylint-git-81ed650d4655f65231d9caa0056dc92b0fcc257d.tar.gz |
[typing] Use __future__ annotations where possible (#8264)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/custom.py | 4 | ||||
-rw-r--r-- | examples/custom_raw.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/custom.py b/examples/custom.py index 003519a56..9f22434d8 100644 --- a/examples/custom.py +++ b/examples/custom.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import TYPE_CHECKING from astroid import nodes @@ -59,7 +61,7 @@ class MyAstroidChecker(BaseChecker): in_class.locals[param.name] = node -def register(linter: "PyLinter") -> None: +def register(linter: PyLinter) -> None: """This required method auto registers the checker during initialization. :param linter: The linter to register the checker to. diff --git a/examples/custom_raw.py b/examples/custom_raw.py index 090f87ea8..68e685504 100644 --- a/examples/custom_raw.py +++ b/examples/custom_raw.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import TYPE_CHECKING from astroid import nodes @@ -37,7 +39,7 @@ class MyRawChecker(BaseRawFileChecker): self.add_message("backslash-line-continuation", line=lineno) -def register(linter: "PyLinter") -> None: +def register(linter: PyLinter) -> None: """This required method auto registers the checker during initialization. :param linter: The linter to register the checker to. |