From 9a7214831038b668ee6567d8aa30a1cf346d22eb Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 16 Nov 2020 10:21:49 -0500 Subject: [PATCH] Squash a regex warning warnings.py:109 - /edx/app/edxapp/edx-platform/common/djangoapps/static_replace/__init__.py:76: DeprecationWarning: Flags not at the start of the expression '\n (?x) ' (truncated) --- common/djangoapps/static_replace/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index c246a37f4d..7d2cff64d3 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -23,8 +23,7 @@ def _url_replace_regex(prefix): To anyone contemplating making this more complicated: http://xkcd.com/1171/ """ - return u""" - (?x) # flags=re.VERBOSE + return """(?x) # flags=re.VERBOSE (?P\\\\?['"]) # the opening quotes (?P{prefix}) # the prefix (?P.*?) # everything else in the url