Fix "house_contacts.py:85: SyntaxWarning: invalid escape sequence '\('"

By adding 'r' to make it a raw string literal.
This commit is contained in:
Joshua Tauberer
2024-06-05 16:53:27 -04:00
parent 54cbc29064
commit 93ab53c778

View File

@@ -82,7 +82,7 @@ def run():
address = "{} {} Washington DC {}-{}".format(office_room, office_building_full, office_zip, office_zip_suffix)
phone = mi.find('phone').text
phone_parsed = re.sub("^\((\d\d\d)\) ", lambda m : m.group(1) + "-", phone) # replace (XXX) area code with XXX- for compatibility w/ existing format
phone_parsed = re.sub(r"^\((\d\d\d)\) ", lambda m : m.group(1) + "-", phone) # replace (XXX) area code with XXX- for compatibility w/ existing format
#for now, no automatic name updates since there is disagremeent on how to handle
# moc["name"]["first"] = firstname