From 2a391d795c0a78c4331ad6c01104f14664baaba7 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Fri, 5 Apr 2024 21:00:39 -0700 Subject: [PATCH] fix SyntaxWarning on python 3.12 --- xxh/xxh_xxh/xxh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xxh/xxh_xxh/xxh.py b/xxh/xxh_xxh/xxh.py index 712c56c..7bd9f69 100644 --- a/xxh/xxh_xxh/xxh.py +++ b/xxh/xxh_xxh/xxh.py @@ -42,7 +42,7 @@ class xxh: self.supported_source_types = ['git', 'path'] self.supported_xxh_packages_regex = '|'.join(self.supported_xxh_packages) self.supported_source_types_regex = '|'.join(self.supported_source_types) - self.package_name_regex = f'xxh\-({self.supported_xxh_packages_regex})-[a-zA-Z0-9_-]+' + self.package_name_regex = rf'xxh\-({self.supported_xxh_packages_regex})-[a-zA-Z0-9_-]+' self.destination_exists = False self.local = False @@ -437,7 +437,7 @@ class xxh: package_source_type='git' package_source=f'https://github.com/xxh/{package_name}' - g = re.match(f'^({self.package_name_regex})\+({self.supported_source_types_regex})\+(.+)$', package_name) + g = re.match(rf'^({self.package_name_regex})\+({self.supported_source_types_regex})\+(.+)$', package_name) if g: package_name = g.group(1) package_source_type = g.group(3)