use raw strings where possible to avoid escaping

This commit is contained in:
Eli Schwartz 2019-09-01 14:44:00 -04:00 committed by Kovid Goyal
parent 3a3ae2590e
commit f04ea0f22e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1153,7 +1153,7 @@ class BooksModel(QAbstractTableModel): # {{{
return False
val = (int(value) if column == 'rating' else
value if column in ('timestamp', 'pubdate')
else re.sub('\\s', ' ', unicode_type(value or '').strip()))
else re.sub(r'\s', ' ', unicode_type(value or '').strip()))
id = self.db.id(row)
books_to_refresh = {id}
if column == 'rating':