

def is_valid(self, node, lint_context):
    ' Whether the specified node is valid.\n\n        In this policy, valid node is only 2 cases;\n        - single quoted\n        - double quoted, but including a special char\n\n        See `:help expr-string`. '
    value = node['value']
    is_double_quoted = (value[0] == '"')
    if (not is_double_quoted):
        return True
    has_escaped_char = (_special_char_matcher.search(value) is not None)
    return has_escaped_char

dataset/ETHPy150Open Kuniwak/vint/vint/linting/policy/prohibit_unnecessary_double_quote.py ProhibitUnnecessaryDoubleQuote.is_valid/original