summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-07 16:49:57 +0100
committerGitHub <noreply@github.com>2021-03-07 16:49:57 +0100
commit04937c3098f2497f88792085f15c36741b9a1f15 (patch)
treef5eb41de3306924b50625832e3cb1faa22c455af /examples
parent0a956d473d5c215c3248df98dc0272005116c55b (diff)
downloadpylint-git-04937c3098f2497f88792085f15c36741b9a1f15.tar.gz
Typing changes + disable unused pylint plugin for pre-commit (#4205)
Diffstat (limited to 'examples')
-rw-r--r--examples/deprecation_checker.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/deprecation_checker.py b/examples/deprecation_checker.py
index fba6a54de..93910b724 100644
--- a/examples/deprecation_checker.py
+++ b/examples/deprecation_checker.py
@@ -38,7 +38,7 @@ from module mymodule:
------------------------------------------------------------------
Your code has been rated at 2.00/10 (previous run: 2.00/10, +0.00)
"""
-from typing import Set, Tuple
+from typing import Set, Tuple, Union
from pylint.checkers import BaseChecker, DeprecatedMixin
from pylint.interfaces import IAstroidChecker
@@ -56,7 +56,7 @@ class DeprecationChecker(DeprecatedMixin, BaseChecker):
# The name defines a custom section of the config for this checker.
name = "deprecated"
- def deprecated_methods(self) -> Set:
+ def deprecated_methods(self) -> Set[str]:
"""Callback method called by DeprecatedMixin for every method/function found in the code.
Returns:
@@ -64,7 +64,9 @@ class DeprecationChecker(DeprecatedMixin, BaseChecker):
"""
return {"mymodule.deprecated_function", "mymodule.MyClass.deprecated_method"}
- def deprecated_arguments(self, method: str) -> Tuple:
+ def deprecated_arguments(
+ self, method: str
+ ) -> Tuple[Tuple[Union[int, None], str], ...]:
"""Callback returning the deprecated arguments of method/function.
Returns: