Skip to content

Commit b9d7a1b

Browse files
committed
misc/units.py: use 'r'aw string markers to avoid 'SyntaxWarning: invalid escape sequence...'
Close #3865 Signed-off-by: Masatake YAMATO <[email protected]>
1 parent b80bde3 commit b9d7a1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

misc/units.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def run_shrink(cmdline_template, finput, foutput, lang):
281281
# otherwise return a list of command line arguments.
282282
def basename_filter(internal, output_type):
283283
filters_external = {
284-
'ctags': 's%\(^[^\t]\{1,\}\t\)\(/\{0,1\}\([^/\t]\{1,\}/\)*\)%\\1%',
284+
'ctags': r's%\(^[^\t]\{1,\}\t\)\(/\{0,1\}\([^/\t]\{1,\}/\)*\)%\\1%',
285285
# "input" in the expresion is for finding input file names in the TAGS file.
286286
# RAWOUT.tmp:
287287
#
@@ -300,9 +300,9 @@ def basename_filter(internal, output_type):
300300
#
301301
# FIXME: if "input" is included as a substring of tag entry names, filtering
302302
# with this expression makes the test fail.
303-
'etags': 's%.*\/\(input[-._][[:print:]]\{1,\}\),\([0-9]\{1,\}$\)%\\1,\\2%',
304-
'xref': 's%\(.*[[:digit:]]\{1,\} \)\([^ ]\{1,\}[^ ]\{1,\}\)/\([^ ].\{1,\}.\{1,\}$\)%\\1\\3%',
305-
'json': 's%\("path": \)"[^"]\{1,\}/\([^/"]\{1,\}\)"%\\1"\\2"%',
303+
'etags': r's%.*\/\(input[-._][[:print:]]\{1,\}\),\([0-9]\{1,\}$\)%\\1,\\2%',
304+
'xref': r's%\(.*[[:digit:]]\{1,\} \)\([^ ]\{1,\}[^ ]\{1,\}\)/\([^ ].\{1,\}.\{1,\}$\)%\\1\\3%',
305+
'json': r's%\("path": \)"[^"]\{1,\}/\([^/"]\{1,\}\)"%\\1"\\2"%',
306306
}
307307
filters_internal = {
308308
'ctags': [r'(^[^\t]+\t)(/?([^/\t]+/)*)', r'\1'],

0 commit comments

Comments
 (0)