'Check that include is not used with a regex ending with a dollar.'

def _check_include_trailing_dollar(self):

    regex_pattern = self.regex.pattern
    if (regex_pattern.endswith('$') and (not regex_pattern.endswith('\\$'))):
        warning = Warning("Your    URL    pattern    {}    uses    include    with    a    regex    ending    with    a    '$'.    Remove    the    dollar    from    the    regex    to    avoid    problems    including    URLs.".format(self.describe()), id='urls.W001')
        return [warning]
    else:
        return []
