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 | b7c95a5a88555314ed6c1a94263f85b0b0e27f24 (patch) | |
tree | 5ef19bba5763eeeafedd4d3135d3370909d91ea1 /pylint/pyreverse/utils.py | |
parent | c8c1984ff419189f6ca11888f60cca036cebc9ec (diff) | |
download | pylint-git-b7c95a5a88555314ed6c1a94263f85b0b0e27f24.tar.gz |
Change the attribute check for using hasattr instead of looking explicitly into __dict__.
Diffstat (limited to 'pylint/pyreverse/utils.py')
-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 9609ad097..90e973d96 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: |