From dcbbfcfb5e660fc2aaf93e4bb8edc07f402351ac Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Thu, 29 Sep 2022 16:55:15 +0200 Subject: [PATCH] Fix DeprecationWarning: invalid escape sequence '\w' --- material/plugins/social/plugin.py | 2 +- src/plugins/social/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/plugins/social/plugin.py b/material/plugins/social/plugin.py index 7af9a7f72..048ab988e 100644 --- a/material/plugins/social/plugin.py +++ b/material/plugins/social/plugin.py @@ -355,7 +355,7 @@ class SocialPlugin(BasePlugin): # Map available font weights to file paths font = dict() for file in files: - match = re.search("-(\w+)\.[ot]tf$", file) + match = re.search(r"-(\w+)\.[ot]tf$", file) if match: font[match.group(1)] = os.path.join(self.cache, file) diff --git a/src/plugins/social/plugin.py b/src/plugins/social/plugin.py index 7af9a7f72..048ab988e 100644 --- a/src/plugins/social/plugin.py +++ b/src/plugins/social/plugin.py @@ -355,7 +355,7 @@ class SocialPlugin(BasePlugin): # Map available font weights to file paths font = dict() for file in files: - match = re.search("-(\w+)\.[ot]tf$", file) + match = re.search(r"-(\w+)\.[ot]tf$", file) if match: font[match.group(1)] = os.path.join(self.cache, file)