Fix regex strings for Python 3.12+

Python 3.12 and newer does complain about single backslash in strings and is probably going to treat it as an error in some future version. Make the string constant a raw string.
master
fmartian 2025-08-17 02:34:50 +02:00 committed by GitHub
parent 68d3d5cd73
commit e7c506ba45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -273,13 +273,13 @@ class ViewerManifest(LLManifest):
# All lines up to and including the first blank line are the file header; skip them
lines.reverse() # so that pop will pull from first to last line
while not re.match("\s*$", lines.pop()) :
while not re.match(r"\s*$", lines.pop()) :
pass # do nothing
# A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names
names = []
for line in lines :
if re.match("\S", line) :
if re.match(r"\S", line) :
names.append(line.rstrip())
# It's not fair to always put the same people at the head of the list
random.shuffle(names)