summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2018-06-01 23:32:32 -0700
committerAshley Whetter <ashley@awhetter.co.uk>2018-06-01 23:32:32 -0700
commitdb63b4928c4210e24b11c87624376fc55b01e09c (patch)
treeefaaa0960e3a7f88521352402145268424e8ddd0 /pylint/checkers/classes.py
parente6c0ec180bf14eb8845b945021308054ca4b0224 (diff)
downloadpylint-git-db63b4928c4210e24b11c87624376fc55b01e09c.tar.gz
Fixed method-hidden raised when assigned to data descriptors
Closes #1061
Diffstat (limited to 'pylint/checkers/classes.py')
-rw-r--r--pylint/checkers/classes.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index dd5f6b89e..6c67be558 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -769,6 +769,14 @@ a metaclass class method.'}
# attribute affectation will either call a setter or raise
# an attribute error, anyway not hiding the function
return
+ try:
+ for infered in decorator.infer():
+ if (isinstance(infered, astroid.ClassDef)
+ and infered.getattr('__get__')
+ and infered.getattr('__set__')):
+ return
+ except (astroid.InferenceError, astroid.AttributeInferenceError):
+ pass
# check if the method is hidden by an attribute
try:
overridden = klass.instance_attr(node.name)[0] # XXX