summaryrefslogtreecommitdiff
path: root/examples/custom.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-03-22 10:33:23 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-03-22 10:33:23 +0100
commitc50f000425ea7168149b690b08e4f9a2f7cc47e5 (patch)
treee08a9d2af27b3d0f82d4ce776056a075bed9bd6e /examples/custom.py
parentbe5996b93d2e2674566fa186af78bf5029b0b9d8 (diff)
downloadpylint-git-c50f000425ea7168149b690b08e4f9a2f7cc47e5.tar.gz
update custom checker in example/custom.py
We don't use compiler.ast nodes, but astng nodes.
Diffstat (limited to 'examples/custom.py')
-rw-r--r--examples/custom.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/examples/custom.py b/examples/custom.py
index 73b64e149..7e4d5e76b 100644
--- a/examples/custom.py
+++ b/examples/custom.py
@@ -17,15 +17,13 @@ class MyASTNGChecker(BaseChecker):
priority = -1
def visit_callfunc(self, node):
- """called when a CallFunc node is encountered. See compiler.ast
- documentation for a description of available nodes:
- http://www.python.org/doc/current/lib/module-compiler.ast.html
- )
- """
- if not (isinstance(node.node, astng.Getattr)
- and isinstance(node.node.expr, astng.Name)
- and node.node.expr.name == 'properties'
- and node.node.attrname == 'create'):
+ """called when a CallFunc node is encountered.
+
+ See logilab.astng for the description of available nodes."""
+ if not (isinstance(node.func, astng.Getattr)
+ and isinstance(node.func.expr, astng.Name)
+ and node.func.expr.name == 'properties'
+ and node.func.attrname == 'create'):
return
in_class = node.frame()
for param in node.args: