File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ This is the current list of error and warning codes:
361
361
+----------+----------------------------------------------------------------------+
362
362
| E714 | test for object identity should be 'is not' |
363
363
+----------+----------------------------------------------------------------------+
364
- | E721 | do not compare types, use 'isinstance()' |
364
+ | E721 (^) | do not compare types, use 'isinstance()' |
365
365
+----------+----------------------------------------------------------------------+
366
366
| E731 | do not assign a lambda expression, use a def |
367
367
+----------+----------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -1053,7 +1053,7 @@ def comparison_negative(logical_line):
1053
1053
yield pos , "E714 test for object identity should be 'is not'"
1054
1054
1055
1055
1056
- def comparison_type (logical_line ):
1056
+ def comparison_type (logical_line , noqa ):
1057
1057
r"""Object type comparisons should always use isinstance().
1058
1058
1059
1059
Do not compare types directly.
@@ -1069,7 +1069,7 @@ def comparison_type(logical_line):
1069
1069
Okay: if type(a1) is type(b1):
1070
1070
"""
1071
1071
match = COMPARE_TYPE_REGEX .search (logical_line )
1072
- if match :
1072
+ if match and not noqa :
1073
1073
inst = match .group (1 )
1074
1074
if inst and isidentifier (inst ) and inst not in SINGLETONS :
1075
1075
return # Allow comparison for types which are not obvious
You can’t perform that action at this time.
0 commit comments