From d80ef4ed2e789e9d756090c55a818f4f5a10e714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Tue, 30 Jun 2020 19:54:58 +1000 Subject: [PATCH] Fix deprecation warnings Fix incomplete character escaping ``` deform/field.py:350: DeprecationWarning: invalid escape sequence \w deform/field.py:351: DeprecationWarning: invalid escape sequence \s ``` (cherry picked from commit 0efc28457d1b420a020387ec280288aee37d16e5) --- deform/field.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deform/field.py b/deform/field.py index 04743c37..0a470bdd 100644 --- a/deform/field.py +++ b/deform/field.py @@ -424,8 +424,8 @@ def default_item_css_class(self): .encode("ascii", "ignore") .decode("ascii") ) - css_class = re.sub("[^\w\s-]", "", css_class).strip().lower() # noQA - css_class = re.sub("[-\s]+", "-", css_class) # noQA + css_class = re.sub(r"[^\w\s-]", "", css_class).strip().lower() # noQA + css_class = re.sub(r"[-\s]+", "-", css_class) # noQA return "item-%s" % css_class def get_widget_requirements(self):