@check_for(Definition)<EOL><INDENT>def check_triple_double_quotes(self, definition, docstring):<DEDENT>
if docstring:<EOL><INDENT>if '<STR_LIT>' in ast.literal_eval(docstring):<EOL><INDENT>regex = re(r"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>regex = re(r'<STR_LIT>')<EOL><DEDENT>if not regex.match(docstring):<EOL><INDENT>illegal_matcher = re(r"""<STR_LIT>""")<EOL>illegal_quotes = illegal_matcher.match(docstring).group(<NUM_LIT:1>)<EOL>return violations.D300(illegal_quotes)<EOL><DEDENT><DEDENT>
r'''D300: Use """triple double quotes""".

        For consistency, always use """triple double quotes""" around
        docstrings. Use r"""raw triple double quotes""" if you use any
        backslashes in your docstrings. For Unicode docstrings, use
        u"""Unicode triple-quoted strings""".

        Note: Exception to this is made if the docstring contains
              """ quotes in its body.