summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/custom.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/custom.py b/examples/custom.py
index 7ee97bb5f..bd9797e2a 100644
--- a/examples/custom.py
+++ b/examples/custom.py
@@ -1,4 +1,4 @@
-import astroid
+from astroid import nodes
from pylint.checkers import BaseChecker
from pylint.interfaces import IAstroidChecker
@@ -45,17 +45,16 @@ class MyAstroidChecker(BaseChecker):
),
)
- def visit_call(self, node):
- """Called when a :class:`.astroid.node_classes.Call` node is visited.
+ def visit_call(self, node: nodes.Call) -> None:
+ """Called when a :class:`.nodes.Call` node is visited.
See :mod:`astroid` for the description of available nodes.
:param node: The node to check.
- :type node: astroid.node_classes.Call
"""
if not (
- isinstance(node.func, astroid.Attribute)
- and isinstance(node.func.expr, astroid.Name)
+ isinstance(node.func, nodes.Attribute)
+ and isinstance(node.func.expr, nodes.Name)
and node.func.expr.name == self.config.store_locals_indicator
and node.func.attrname == "create"
):