Fix invalid escape syntax warnings

Additionally use rawstrings with all regex calls
This commit is contained in:
wereii
2024-09-10 15:15:24 +02:00
committed by Tomas
parent 1ea6136cb2
commit 954a164922
17 changed files with 43 additions and 43 deletions

View File

@@ -117,7 +117,7 @@ class PyfaJsonWriter(BaseWriter):
# Prefer safe way - replace any characters besides
# alphanumeric and few special characters with
# underscore
writer_safe_name = re.sub('[^\w\-.,() ]', '_', name, flags=re.UNICODE)
writer_safe_name = re.sub(r'[^\w\-.,() ]', '_', name, flags=re.UNICODE)
return writer_safe_name