Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
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 0efc284)
  • Loading branch information
viraptor authored and stevepiercy committed Aug 22, 2020
1 parent 5874983 commit d80ef4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deform/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d80ef4e

Please sign in to comment.