BIM,CAM: Resolve Python invalid escape sequence warnings

This commit is contained in:
Chris Mayo
2024-11-04 19:22:33 +00:00
committed by Chris Hennes
parent 6b490fc8af
commit cf8355ccb3
3 changed files with 4 additions and 4 deletions

View File

@@ -1433,9 +1433,9 @@ class IfcSchema:
entity = {}
raw_entity_str = m.groups()[0]
entity["name"] = re.search("(.*?)[;|\s]", raw_entity_str).groups()[0].upper()
entity["name"] = re.search(r"(.*?)[;|\s]", raw_entity_str).groups()[0].upper()
subtypeofmatch = re.search(".*SUBTYPE OF \((.*?)\);", raw_entity_str)
subtypeofmatch = re.search(r".*SUBTYPE OF \((.*?)\);", raw_entity_str)
entity["supertype"] = subtypeofmatch.groups()[0].upper() if subtypeofmatch else None
# find the shortest string matched from the end of the entity type header to the