summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-07-23 19:21:42 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2024-07-23 19:23:50 +0200
commit8916953b534f64a7545860ad5b4b36dc2544f33a (patch)
tree98fa71269f150691adbc58aee6d843e608029c64 /doc
parentMerge pull request #16425 from opensourcerouting/fix/do_not_prepend_an_empty_... (diff)
downloadfrr-8916953b534f64a7545860ad5b4b36dc2544f33a.tar.xz
frr-8916953b534f64a7545860ad5b4b36dc2544f33a.zip
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 <equinox@opensourcerouting.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/developer/conf.py2
-rw-r--r--doc/manpages/conf.py2
-rw-r--r--doc/user/conf.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/doc/developer/conf.py b/doc/developer/conf.py
index 6a3ffe163..76dd1e4f2 100644
--- a/doc/developer/conf.py
+++ b/doc/developer/conf.py
@@ -96,7 +96,7 @@ replace_vars = {
# extract version information, installation location, other stuff we need to
# use when building final documents
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+val = re.compile(r'^S\["([^"]+)"\]="(.*)"$')
try:
with open("../../config.status", "r") as cfgstatus:
for ln in cfgstatus.readlines():
diff --git a/doc/manpages/conf.py b/doc/manpages/conf.py
index 73dea094a..995885b22 100644
--- a/doc/manpages/conf.py
+++ b/doc/manpages/conf.py
@@ -91,7 +91,7 @@ replace_vars = {
# extract version information, installation location, other stuff we need to
# use when building final documents
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+val = re.compile(r'^S\["([^"]+)"\]="(.*)"$')
try:
with open("../../config.status", "r") as cfgstatus:
for ln in cfgstatus.readlines():
diff --git a/doc/user/conf.py b/doc/user/conf.py
index 395875520..18f048bc0 100644
--- a/doc/user/conf.py
+++ b/doc/user/conf.py
@@ -96,7 +96,7 @@ replace_vars = {
# extract version information, installation location, other stuff we need to
# use when building final documents
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+val = re.compile(r'^S\["([^"]+)"\]="(.*)"$')
try:
with open("../../config.status", "r") as cfgstatus:
for ln in cfgstatus.readlines():