File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ This is the current list of error and warning codes:
361361+----------+----------------------------------------------------------------------+
362362| E714 | test for object identity should be 'is not' |
363363+----------+----------------------------------------------------------------------+
364- | E721 | do not compare types, use 'isinstance()' |
364+ | E721 (^) | do not compare types, use 'isinstance()' |
365365+----------+----------------------------------------------------------------------+
366366| E731 | do not assign a lambda expression, use a def |
367367+----------+----------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -1053,7 +1053,7 @@ def comparison_negative(logical_line):
10531053 yield pos , "E714 test for object identity should be 'is not'"
10541054
10551055
1056- def comparison_type (logical_line ):
1056+ def comparison_type (logical_line , noqa ):
10571057 r"""Object type comparisons should always use isinstance().
10581058
10591059 Do not compare types directly.
@@ -1069,7 +1069,7 @@ def comparison_type(logical_line):
10691069 Okay: if type(a1) is type(b1):
10701070 """
10711071 match = COMPARE_TYPE_REGEX .search (logical_line )
1072- if match :
1072+ if match and not noqa :
10731073 inst = match .group (1 )
10741074 if inst and isidentifier (inst ) and inst not in SINGLETONS :
10751075 return # Allow comparison for types which are not obvious
You can’t perform that action at this time.
0 commit comments