diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 10:12:35 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 10:39:07 +0100 |
commit | fb65f75846ff4a81cced80f9d1ed09bda6f80475 (patch) | |
tree | c5b447f1a437898f267a1950f2cbfae0c4527726 /pylint/checkers/deprecated.py | |
parent | f8e7b1342bf4091b27d1487e617a94a5b8d09019 (diff) | |
download | pylint-git-fb65f75846ff4a81cced80f9d1ed09bda6f80475.tar.gz |
Add typing that were lacking following refactor
See : 6721cd1cf2da0294124b75d382a042e23ec27d47
Diffstat (limited to 'pylint/checkers/deprecated.py')
-rw-r--r-- | pylint/checkers/deprecated.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/pylint/checkers/deprecated.py b/pylint/checkers/deprecated.py index 358c88ee4..8fe491c15 100644 --- a/pylint/checkers/deprecated.py +++ b/pylint/checkers/deprecated.py @@ -2,7 +2,7 @@ # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Checker mixin for deprecated functionality.""" - +from collections.abc import Iterable from itertools import chain from typing import Any @@ -39,20 +39,16 @@ class DeprecatedMixin: "deprecated-method", "deprecated-argument", ) - def visit_call(self, node): - """Called when a :class:`.astroid.node_classes.Call` node is visited. - - Args: - node (astroid.node_classes.Call): The node to check. - """ + def visit_call(self, node: astroid.node_classes.Call) -> None: + """Called when a :class:`.astroid.node_classes.Call` node is visited.""" try: for inferred in node.func.infer(): # Calling entry point for deprecation check logic. self.check_deprecated_method(node, inferred) except astroid.InferenceError: - return + pass - def deprecated_methods(self): + def deprecated_methods(self) -> Iterable: """Callback returning the deprecated methods/functions. Returns: @@ -61,7 +57,7 @@ class DeprecatedMixin: # pylint: disable=no-self-use return () - def deprecated_arguments(self, method: str): + def deprecated_arguments(self, method: str) -> Iterable: """Callback returning the deprecated arguments of method/function. Args: |