Fix invalid escape syntax warnings
Additionally use rawstrings with all regex calls
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user