summaryrefslogtreecommitdiff
path: root/checkers/typecheck.py
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-08-08 19:31:05 +0300
committercpopa <devnull@localhost>2014-08-08 19:31:05 +0300
commita9e93977a6cf695c64e7b43cdda0c8e7181452ff (patch)
treee4f66991bf12c35737bf35c7ed37ef6c8c3e1ca5 /checkers/typecheck.py
parentd88a7ca5243185fa4bcd2353a2128baab89bacdb (diff)
downloadpylint-a9e93977a6cf695c64e7b43cdda0c8e7181452ff.tar.gz
Cleanup.
Diffstat (limited to 'checkers/typecheck.py')
-rw-r--r--checkers/typecheck.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/checkers/typecheck.py b/checkers/typecheck.py
index b1a4c83..537a220 100644
--- a/checkers/typecheck.py
+++ b/checkers/typecheck.py
@@ -540,7 +540,6 @@ accessed. Python regular expressions are accepted.'}
# slice or instances with __index__.
parent_type = safe_infer(node.parent.value)
-
if not isinstance(parent_type, (astroid.Class, astroid.Instance)):
return
@@ -569,13 +568,10 @@ accessed. Python regular expressions are accepted.'}
if not isinstance(itemmethod, astroid.Function):
return
-
if itemmethod.root().name != BUILTINS:
return
-
if not itemmethod.parent:
return
-
if itemmethod.parent.name not in SEQUENCE_TYPES:
return
@@ -586,7 +582,6 @@ accessed. Python regular expressions are accepted.'}
index_type = node
else:
index_type = safe_infer(node)
-
if index_type is None or index_type is astroid.YES:
return
@@ -598,7 +593,6 @@ accessed. Python regular expressions are accepted.'}
elif isinstance(index_type, astroid.Instance):
if index_type.pytype() in (BUILTINS + '.int', BUILTINS + '.slice'):
return
-
try:
index_type.getattr('__index__')
return
@@ -616,7 +610,6 @@ accessed. Python regular expressions are accepted.'}
continue
index_type = safe_infer(index)
-
if index_type is None or index_type is astroid.YES:
continue