protect regexps as raw-strings
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 21 Nov 2025 10:35:28 +0000 (11:35 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 21 Nov 2025 10:35:28 +0000 (11:35 +0100)
PLC/Methods/GetPlcRelease.py

index 07b16f8..99603fe 100644 (file)
@@ -4,12 +4,12 @@ from PLC.Faults import *
 
 import re
 
-comment_regexp = '\A\s*#.|\A\s*\Z|\Axxxxx'
+comment_regexp = r'\A\s*#.|\A\s*\Z|\Axxxxx'
 
-regexps = { 'build'   : '\A[bB]uild\s+(?P<key>[^:]+)\s*:\s*(?P<value>.*)\Z',
-            'tags'    : '\A(?P<key>[^:]+)\s*:=\s*(?P<value>.*)\Z',
+regexps = { 'build'   : r'\A[bB]uild\s+(?P<key>[^:]+)\s*:\s*(?P<value>.*)\Z',
+            'tags'    : r'\A(?P<key>[^:]+)\s*:=\s*(?P<value>.*)\Z',
 # spaces not part of key : ungreedy
-            'rpms'    : '\A(?P<key>[^:]+?)\s*::\s*(?P<value>.*)\Z',
+            'rpms'    : r'\A(?P<key>[^:]+?)\s*::\s*(?P<value>.*)\Z',
 }
 
 class GetPlcRelease(Method):