def comparison_type(logical_line, noqa):
 match = COMPARE_TYPE_REGEX.search(logical_line)
 if (match and (not noqa)):
  inst = match.group(1)
  if (inst and isidentifier(inst) and (inst not in SINGLETONS)):
   return
  (yield (match.start(), "E721 do not compare types, use 'isinstance()'"))

def comparison_type ( logical_line , noqa ) : match = COMPARE_TYPE_REGEX . search ( logical_line ) if ( match and ( not noqa ) ) : inst = match . group ( 1 ) if ( inst and isidentifier ( inst ) and ( inst not in SINGLETONS ) ) : return ( yield ( match . start ( ) , "E721 do not compare types, use 'isinstance()'" ) )
object type comparisons should always use isinstance() .