summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pep8.py b/pep8.py
index e58662f..b0a99ce 100755
--- a/pep8.py
+++ b/pep8.py
@@ -1053,7 +1053,7 @@ def comparison_negative(logical_line):
yield pos, "E714 test for object identity should be 'is not'"
-def comparison_type(logical_line):
+def comparison_type(logical_line, noqa):
r"""Object type comparisons should always use isinstance().
Do not compare types directly.
@@ -1069,7 +1069,7 @@ def comparison_type(logical_line):
Okay: if type(a1) is type(b1):
"""
match = COMPARE_TYPE_REGEX.search(logical_line)
- if match:
+ if match and not noqa:
inst = match.group(1)
if inst and isidentifier(inst) and inst not in SINGLETONS:
return # Allow comparison for types which are not obvious