Pokemon Emerald: Fix invalid escape sequence warnings (#4328)
Generation on Python 3.12 would print SyntaxWarnings due to invalid '\d' escape sequences added in #3832. Use raw strings to avoid `\` being used to escape characters.
This commit is contained in:
parent
144d612c52
commit
f5e3677ef1
|
@ -397,13 +397,13 @@ def _init() -> None:
|
||||||
label = []
|
label = []
|
||||||
for word in map_name[4:].split("_"):
|
for word in map_name[4:].split("_"):
|
||||||
# 1F, B1F, 2R, etc.
|
# 1F, B1F, 2R, etc.
|
||||||
re_match = re.match("^B?\d+[FRP]$", word)
|
re_match = re.match(r"^B?\d+[FRP]$", word)
|
||||||
if re_match:
|
if re_match:
|
||||||
label.append(word)
|
label.append(word)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Route 103, Hall 1, House 5, etc.
|
# Route 103, Hall 1, House 5, etc.
|
||||||
re_match = re.match("^([A-Z]+)(\d+)$", word)
|
re_match = re.match(r"^([A-Z]+)(\d+)$", word)
|
||||||
if re_match:
|
if re_match:
|
||||||
label.append(re_match.group(1).capitalize())
|
label.append(re_match.group(1).capitalize())
|
||||||
label.append(re_match.group(2).lstrip("0"))
|
label.append(re_match.group(2).lstrip("0"))
|
||||||
|
|
Loading…
Reference in New Issue