From d5059979d55932a5d1a40798359bcce35769d1e2 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 25 Oct 2024 14:18:22 +0200 Subject: [PATCH] Marked 2 strings as raw strings to suppress warnings --- cps/admin.py | 2 +- cps/string_helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 841062215..f7a7bee2a 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -2089,7 +2089,7 @@ def extract_user_data_from_field(user, field): def extract_dynamic_field_from_filter(user, filtr): - match = re.search("([a-zA-Z0-9-]+)=%s", filtr, re.IGNORECASE | re.UNICODE) + match = re.search(r"([a-zA-Z0-9-]+)=%s", filtr, re.IGNORECASE | re.UNICODE) if match: return match.group(1) else: diff --git a/cps/string_helper.py b/cps/string_helper.py index b2d0cf81e..d263dd2f2 100644 --- a/cps/string_helper.py +++ b/cps/string_helper.py @@ -19,5 +19,5 @@ import re def strip_whitespaces(text): - return re.sub("(^[\s\u200B-\u200D\ufeff]+)|([\s\u200B-\u200D\ufeff]+$)","", text) + return re.sub(r"(^[\s\u200B-\u200D\ufeff]+)|([\s\u200B-\u200D\ufeff]+$)","", text)