Skip to content

Commit 8f8bd98

Browse files
cclaussdpgeorge
authored andcommitted
all: Fix strings with backslash by using raw string literals.
1 parent cda2929 commit 8f8bd98

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
# Additional stuff for the LaTeX preamble.
234234
#'preamble': '',
235235
# Include 3 levels of headers in PDF ToC
236-
'preamble': '\setcounter{tocdepth}{2}',
236+
'preamble': r'\setcounter{tocdepth}{2}',
237237
}
238238

239239
# Grouping the document tree into LaTeX files. List of tuples

ports/cc3200/tools/uniflash.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
"""
3+
r"""
44
Flash the WiPy (format, update service pack and program).
55
66
Example:

tools/insert-usb-ids.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def parse_usb_ids(filename):
1616
rv = dict()
1717
for line in open(filename).readlines():
1818
line = line.rstrip("\r\n")
19-
match = re.match("^#define\s+(\w+)\s+\(0x([0-9A-Fa-f]+)\)$", line)
19+
match = re.match(r"^#define\s+(\w+)\s+\(0x([0-9A-Fa-f]+)\)$", line)
2020
if match and match.group(1).startswith(config_prefix):
2121
key = match.group(1).replace(config_prefix, "USB_")
2222
val = match.group(2)

tools/uf2conv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def get_drives():
271271
]
272272
)
273273
for line in to_str(r).split("\n"):
274-
words = re.split("\s+", line)
274+
words = re.split(r"\s+", line)
275275
if len(words) >= 3 and words[1] == "2" and words[2] == "FAT":
276276
drives.append(words[0])
277277
else:

0 commit comments

Comments
 (0)