Skip to content

Commit

Permalink
Merge pull request #16449 from opensourcerouting/py-invalid-escapes
Browse files Browse the repository at this point in the history
build: fix a few python string escape warnings
  • Loading branch information
donaldsharp authored Jul 25, 2024
2 parents 30bbba1 + 8916953 commit 035542f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/developer/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

# 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():
Expand Down
2 changes: 1 addition & 1 deletion doc/manpages/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

# 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():
Expand Down
2 changes: 1 addition & 1 deletion doc/user/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

# 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():
Expand Down
2 changes: 1 addition & 1 deletion python/firstheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
argp.add_argument("--warn-empty", action="store_const", const=True)
argp.add_argument("--pipe", action="store_const", const=True)

include_re = re.compile('^#\s*include\s+["<]([^ ">]+)[">]', re.M)
include_re = re.compile(r'^#\s*include\s+["<]([^ ">]+)[">]', re.M)

ignore = [
lambda fn: fn.startswith("tools/"),
Expand Down
2 changes: 1 addition & 1 deletion python/makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
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)
Expand Down

0 comments on commit 035542f

Please sign in to comment.