From 0e3da4d754adfe3ff727aa3183ea45ceed2b147b Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 8 Dec 2015 13:41:06 +0200 Subject: Change the attribute check for using hasattr instead of looking explicitly into __dict__. --- pylint/pyreverse/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pylint') diff --git a/pylint/pyreverse/utils.py b/pylint/pyreverse/utils.py index 9609ad0..90e973d 100644 --- a/pylint/pyreverse/utils.py +++ b/pylint/pyreverse/utils.py @@ -203,7 +203,7 @@ class LocalsVisitor(ASTWalker): methods = self.get_callbacks(node) if methods[0] is not None: methods[0](node) - if 'locals' in node.__dict__: # skip Instance and other proxy + if hasattr(node, 'locals'): # skip Instance and other proxy for local_node in node.values(): self.visit(local_node) if methods[1] is not None: -- cgit v1.2.1