mirror of
https://github.com/freedoom/freedoom.git
synced 2025-08-29 14:16:55 -04:00
pass regular expressions as raw strings in Python scripts (#1450)
This commit is contained in:
parent
324071330e
commit
61a0917526
2 changed files with 4 additions and 4 deletions
|
@ -103,7 +103,7 @@ freedoom_bex = read_bex_lump("../../lumps/p2_deh.lmp")
|
|||
freedm_bex = read_bex_lump("../../lumps/fdm_deh.lmp")
|
||||
|
||||
def read_bex_string(whichbex,defn):
|
||||
return re.sub("^\w*\d:\s*", "", whichbex[defn])
|
||||
return re.sub(r"^\w*\d:\s*", "", whichbex[defn])
|
||||
|
||||
|
||||
white_graphics = {
|
||||
|
@ -252,7 +252,7 @@ def update_level_name(lumpname, bexdata, bexname):
|
|||
"Level name %s not defined in " "DEHACKED lump!" % bexname
|
||||
)
|
||||
# Strip "MAP01: " or "E1M2: " etc. from start, if present:
|
||||
levelname = re.sub("^\w*\d:\s*", "", bexdata[bexname])
|
||||
levelname = re.sub(r"^\w*\d:\s*", "", bexdata[bexname])
|
||||
white_graphics[lumpname] = levelname
|
||||
|
||||
for e in range(4):
|
||||
|
|
|
@ -34,8 +34,8 @@ import re
|
|||
debug = False
|
||||
defines = {}
|
||||
|
||||
command_re = re.compile("\#(\w+)(\s+(.*))?")
|
||||
include_re = re.compile('\s*"(.*)"\s*')
|
||||
command_re = re.compile(r"\#(\w+)(\s+(.*))?")
|
||||
include_re = re.compile(r'\s*"(.*)"\s*')
|
||||
|
||||
|
||||
def debug_msg(message):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue