(logical_line)
Check for assertEqual(True|False, A in B), assertEqual(A in B, True|False)

    M338
Check for assertEqual(True|False, A in B), assertEqual(A in B, True|False)
Check for assertEqual ( True|False A in B ) assertEqual ( A in B True|False )
def assert_equal_in(logical_line):
    """Check for assertEqual(True|False, A in B), assertEqual(A in B, True|False)

    M338
    """
    res = (assert_equal_in_start_with_true_or_false_re.search(logical_line) or
           assert_equal_in_end_with_true_or_false_re.search(logical_line))
    if res:
        yield (0, "M338: Use assertIn/NotIn(A, B) rather than "
                  "assertEqual(A in B, True/False) when checking collection "
                  "contents.")
def assert_equal_in ( logical_line ) : res = ( assert_equal_in_start_with_true_or_false_re . search ( logical_line ) or assert_equal_in_end_with_true_or_false_re . search ( logical_line ) ) if res : yield ( 0 , "M338: Use assertIn/NotIn(A, B) rather than " "assertEqual(A in B, True/False) when checking collection " "contents." )