Skip to content

Commit e97436a

Browse files
MysteryemAustinSumigray
authored andcommitted
Pokemon Emerald: Fix invalid escape sequence warnings (ArchipelagoMW#4328)
Generation on Python 3.12 would print SyntaxWarnings due to invalid '\d' escape sequences added in ArchipelagoMW#3832. Use raw strings to avoid `\` being used to escape characters.
1 parent d061a0b commit e97436a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worlds/pokemon_emerald/data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,13 @@ def _init() -> None:
397397
label = []
398398
for word in map_name[4:].split("_"):
399399
# 1F, B1F, 2R, etc.
400-
re_match = re.match("^B?\d+[FRP]$", word)
400+
re_match = re.match(r"^B?\d+[FRP]$", word)
401401
if re_match:
402402
label.append(word)
403403
continue
404404

405405
# Route 103, Hall 1, House 5, etc.
406-
re_match = re.match("^([A-Z]+)(\d+)$", word)
406+
re_match = re.match(r"^([A-Z]+)(\d+)$", word)
407407
if re_match:
408408
label.append(re_match.group(1).capitalize())
409409
label.append(re_match.group(2).lstrip("0"))

0 commit comments

Comments
 (0)