Mark regexps as regexps ("SyntaxWarning: invalid escape sequence...")

This commit is contained in:
Stephane Bortzmeyer 2024-05-15 20:04:29 +02:00
parent a57e78c6fc
commit 9d294b2cb5
1 changed files with 2 additions and 2 deletions

View File

@ -151,10 +151,10 @@ if input_ok:
""", file=gemfile)
for line in raw.readlines():
line=line[:-1] # Chop end-of-line
if re.search("^\s*#", line):
if re.search(r"^\s*#", line):
continue # Ignore comments
else:
match = re.search("^\s*:([a-zA-Z]+):\s*(.*)", line)
match = re.search(r"^\s*:([a-zA-Z]+):\s*(.*)", line)
if match:
if match.group(1) == "Issued":
issued = match.group(2)