From 8916953b534f64a7545860ad5b4b36dc2544f33a Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 23 Jul 2024 10:21:42 -0700 Subject: build: fix a few python string escape warnings When using a regex (or anything that uses `\?` escapes) in python, raw strings (`r"content"`) should be used so python doesn't consume the escapes itself. Otherwise we get either broken behavior and/or `SyntaxWarning: invalid escape sequence '\['` Signed-off-by: David Lamparter --- python/makefile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/makefile.py') diff --git a/python/makefile.py b/python/makefile.py index 573871fb68..45f032296f 100644 --- a/python/makefile.py +++ b/python/makefile.py @@ -91,7 +91,7 @@ lines = before.splitlines() autoderp = "#AUTODERP# " out_lines = [] bcdeps = [] -make_rule_re = re.compile("^([^:\s]+):\s*([^:\s]+)\s*($|\n)") +make_rule_re = re.compile(r"^([^:\s]+):\s*([^:\s]+)\s*($|\n)") while lines: line = lines.pop(0) -- cgit v1.2.3