From 56d88978115aabfa25260366e8777766196f4997 Mon Sep 17 00:00:00 2001 From: Derek Ditch Date: Fri, 25 Jul 2025 11:06:06 -0500 Subject: [PATCH] Change regex string to raw string to avoid improper escape The regex string `'\W+'` causes a `SyntaxWarning` in Python 3.12 and later, since this is an invalid escape sequence. It will eventually become a `SyntaxError` in later versions. Changing this to a raw string will prevent it from being misinterpreted as an escape sequence. --- repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.py b/repo.py index f52e0b00..69be67ca 100644 --- a/repo.py +++ b/repo.py @@ -36,7 +36,7 @@ def get_modules_path(self): return os.path.join(self.get_absolute_path(), 'module-types') def slug_format(self, name): - return re_sub('\W+', '-', name.lower()) + return re_sub(r'\W+', '-', name.lower()) def pull_repo(self): try: