Skip to content

Commit 3bcf70a

Browse files
committed
fix pytest deprecation warnings
1 parent 88ff1a7 commit 3bcf70a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/protocol_settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def determine_delimiter(first_row) -> str:
343343
if first_row.count(';') < first_row.count(','):
344344
delimeter = ','
345345

346-
first_row = re.sub(r"\s+" + re.escape(delimeter) +"|" + re.escape(delimeter) +"\s+", delimeter, first_row) #trim values
346+
first_row = re.sub(r"\s+" + re.escape(delimeter) +"|" + re.escape(delimeter) +r"\s+", delimeter, first_row) #trim values
347347

348348
csvfile = itertools.chain([first_row], csvfile) #add clean header to begining of iterator
349349

@@ -379,7 +379,7 @@ def determine_delimiter(first_row) -> str:
379379
variable_name = row['variable name'] if row['variable name'] else row['documented name']
380380
variable_name = variable_name = variable_name.strip().lower().replace(' ', '_').replace('__', '_') #clean name
381381

382-
if re.search("[^a-zA-Z0-9\_]", variable_name) :
382+
if re.search(r"[^a-zA-Z0-9\_]", variable_name) :
383383
print("WARNING Invalid Name : " + str(variable_name) + " reg: " + str(row['register']) + " doc name: " + str(row['documented name']) + " path: " + str(path))
384384

385385
#convert to float
@@ -913,7 +913,7 @@ def validate_registry_entry(self, entry : registry_map_entry, val) -> int:
913913
return 0
914914

915915
if entry.data_type == Data_Type.ASCII:
916-
if val and not re.match('[^a-zA-Z0-9\_\-]', val): #validate ascii
916+
if val and not re.match(r'[^a-zA-Z0-9\_\-]', val): #validate ascii
917917
if entry.value_regex: #regex validation
918918
if re.match(entry.value_regex, val):
919919
if entry.concatenate:

0 commit comments

Comments
 (0)