resolvers.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:lifesoundtrack 作者: MTG 项目源码 文件源码
def _check_include_trailing_dollar(self):
        """
        Check that include is not used with a regex ending with a dollar.
        """
        regex_pattern = self.regex.pattern
        if regex_pattern.endswith('$') and not regex_pattern.endswith(r'\$'):
            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 []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号