diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-12-08 13:41:06 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-12-08 13:41:06 +0200 |
commit | 0e3da4d754adfe3ff727aa3183ea45ceed2b147b (patch) | |
tree | 857dd940ecbebc26d88646a2ac91033f0b691150 | |
parent | cb41aa237e4c637da2a9be4e44823d036e1e6430 (diff) | |
download | pylint-0e3da4d754adfe3ff727aa3183ea45ceed2b147b.tar.gz |
Change the attribute check for using hasattr instead of looking explicitly into __dict__.
-rw-r--r-- | pylint/pyreverse/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
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: |