@utils.check_messages('singleton-comparison', 'misplaced-comparison-constant', 'unidiomatic-typecheck', 'literal-comparison', 'comparison-with-itself', 'comparison-with-callable')
def visit_compare(self, node):
    self._check_callable_comparison(node)
    self._check_logical_tautology(node)
    self._check_unidiomatic_typecheck(node)
    if (len(node.ops) != 1):
        return
    left = node.left
    (operator, right) = node.ops[0]
    if ((operator in COMPARISON_OPERATORS) and isinstance(left, astroid.Const)):
        self._check_misplaced_constant(node, left, right, operator)
    if (operator in ('==', '!=')):
        self._check_singleton_comparison(left, right, node, checking_for_absence=(operator == '!='))
    if (operator in ('==', '!=', 'is', 'is not')):
        self._check_nan_comparison(left, right, node, checking_for_absence=(operator in ('!=', 'is not')))
    if (operator in ('is', 'is not')):
        self._check_literal_comparison(right, node)
@utils.check_messages('singleton-comparison', 'misplaced-comparison-constant', 'unidiomatic-typecheck', 'literal-comparison', 'comparison-with-itself', 'comparison-with-callable')
def visit_compare(self, node):
    self._check_callable_comparison(node)
    self._check_logical_tautology(node)
    self._check_unidiomatic_typecheck(node)
    if (len(node.ops) != 1):
        return
    left = node.left
    (operator, right) = node.ops[0]
    if ((operator in COMPARISON_OPERATORS) and isinstance(left, astroid.Const)):
        self._check_misplaced_constant(node, left, right, operator)
    if (operator in ('==', '!=')):
        self._check_singleton_comparison(left, right, node, checking_for_absence=(operator == '!='))
    if (operator in ('==', '!=', 'is', 'is not')):
        self._check_nan_comparison(left, right, node, checking_for_absence=(operator in ('!=', 'is not')))
    if (operator in ('is', 'is not')):
        self._check_literal_comparison(right, node)