Skip to content

Commit e7c506b

Browse files
authored
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.
1 parent 68d3d5c commit e7c506b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indra/newview/viewer_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ def extract_names(self,src):
273273

274274
# All lines up to and including the first blank line are the file header; skip them
275275
lines.reverse() # so that pop will pull from first to last line
276-
while not re.match("\s*$", lines.pop()) :
276+
while not re.match(r"\s*$", lines.pop()) :
277277
pass # do nothing
278278

279279
# A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names
280280
names = []
281281
for line in lines :
282-
if re.match("\S", line) :
282+
if re.match(r"\S", line) :
283283
names.append(line.rstrip())
284284
# It's not fair to always put the same people at the head of the list
285285
random.shuffle(names)

0 commit comments

Comments
 (0)