summaryrefslogtreecommitdiff
path: root/checkers
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2013-10-10 15:26:30 +0300
committercpopa <devnull@localhost>2013-10-10 15:26:30 +0300
commit80f6ff3444aacd78914d7b311d81c7236fa41d5f (patch)
tree016bd027788ebf003a85598c2d22949025eb609c /checkers
parent34f02fb9bfe466a80e941faa088b8a5d2d35585a (diff)
downloadpylint-80f6ff3444aacd78914d7b311d81c7236fa41d5f.tar.gz
Ignore deques (can't retrieve special methods).
Diffstat (limited to 'checkers')
-rw-r--r--checkers/base.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/checkers/base.py b/checkers/base.py
index afe6fd2..db5f2cc 100644
--- a/checkers/base.py
+++ b/checkers/base.py
@@ -724,7 +724,12 @@ functions, methods
break
else:
break
- else:
+ else:
+ # check if it is a .deque. It doesn't seem that
+ # we can retrieve special methods
+ # from C implemented constructs
+ if argument._proxied.qname().endswith(".deque"):
+ return
self.add_message('bad-reversed-sequence', node=node)
elif not isinstance(argument, (astroid.List, astroid.Tuple)):
# everything else is not a proper sequence for reversed()