From 6457ec0a59aace467d1cc622c98f86ecc915be48 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 21 Nov 2025 11:35:28 +0100 Subject: [PATCH] protect regexps as raw-strings --- PLC/Methods/GetPlcRelease.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PLC/Methods/GetPlcRelease.py b/PLC/Methods/GetPlcRelease.py index 07b16f8e..99603fe0 100644 --- a/PLC/Methods/GetPlcRelease.py +++ b/PLC/Methods/GetPlcRelease.py @@ -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[^:]+)\s*:\s*(?P.*)\Z', - 'tags' : '\A(?P[^:]+)\s*:=\s*(?P.*)\Z', +regexps = { 'build' : r'\A[bB]uild\s+(?P[^:]+)\s*:\s*(?P.*)\Z', + 'tags' : r'\A(?P[^:]+)\s*:=\s*(?P.*)\Z', # spaces not part of key : ungreedy - 'rpms' : '\A(?P[^:]+?)\s*::\s*(?P.*)\Z', + 'rpms' : r'\A(?P[^:]+?)\s*::\s*(?P.*)\Z', } class GetPlcRelease(Method): -- 2.51.1