def portals(self):
"""Map the portal directions for an area to neighbors."""
portals = {}
- if re.match("""^area:-?\d+,-?\d+,-?\d+$""", self.key):
+ if re.match(r"""^area:-?\d+,-?\d+,-?\d+$""", self.key):
coordinates = [(int(x))
for x in self.key.split(":")[1].split(",")]
offsets = dict(
"$(eol)$(bld)%s$(nrm)" % e)
elif arguments[0] == "log":
if len(arguments) == 4:
- if re.match("^\d+$", arguments[3]) and int(arguments[3]) >= 0:
+ if re.match(r"^\d+$", arguments[3]) and int(arguments[3]) >= 0:
stop = int(arguments[3])
else:
stop = -1
else:
stop = 0
if len(arguments) >= 3:
- if re.match("^\d+$", arguments[2]) and int(arguments[2]) > 0:
+ if re.match(r"^\d+$", arguments[2]) and int(arguments[2]) > 0:
start = int(arguments[2])
else:
start = -1
else:
start = 10
if len(arguments) >= 2:
- if (re.match("^\d+$", arguments[1])
+ if (re.match(r"^\d+$", arguments[1])
and 0 <= int(arguments[1]) <= 9):
level = int(arguments[1])
else: