diff options
author | cpopa <devnull@localhost> | 2014-08-23 10:22:07 +0300 |
---|---|---|
committer | cpopa <devnull@localhost> | 2014-08-23 10:22:07 +0300 |
commit | 38af5b8b4a021633f4ef51258f9326f667860f9c (patch) | |
tree | dfe3a325aa710db8619a607168a082f53172747c /checkers/classes.py | |
parent | 89aeb11ab83422f28ab2f894599bffb28a33ae51 (diff) | |
download | pylint-38af5b8b4a021633f4ef51258f9326f667860f9c.tar.gz |
Fix a crash which ocurred while checking for 'method-hidden', when the parent frame was something different than a function.
Diffstat (limited to 'checkers/classes.py')
-rw-r--r-- | checkers/classes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/checkers/classes.py b/checkers/classes.py index d9ebd8d..aa05558 100644 --- a/checkers/classes.py +++ b/checkers/classes.py @@ -377,7 +377,8 @@ a metaclass class method.'} try: overridden = klass.instance_attr(node.name)[0] # XXX overridden_frame = overridden.frame() - if overridden_frame.type == 'method': + if (isinstance(overridden_frame, astroid.Function) + and overridden_frame.type == 'method'): overridden_frame = overridden_frame.parent.frame() if (isinstance(overridden_frame, Class) and klass._is_subtype_of(overridden_frame.qname())): |