From 9d294b2cb5a34768e3e5de71d075c3259cc41979 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Wed, 15 May 2024 20:04:29 +0200 Subject: [PATCH] Mark regexps as regexps ("SyntaxWarning: invalid escape sequence...") --- presto2gemini.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/presto2gemini.py b/presto2gemini.py index 278b1c9..606b828 100755 --- a/presto2gemini.py +++ b/presto2gemini.py @@ -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)