summaryrefslogtreecommitdiff
path: root/checkers/classes.py
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-08-23 10:22:07 +0300
committercpopa <devnull@localhost>2014-08-23 10:22:07 +0300
commit38af5b8b4a021633f4ef51258f9326f667860f9c (patch)
treedfe3a325aa710db8619a607168a082f53172747c /checkers/classes.py
parent89aeb11ab83422f28ab2f894599bffb28a33ae51 (diff)
downloadpylint-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.py3
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())):