From 51054cef600c4e13c338b05cebf02fcf02b887d6 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Tue, 27 Feb 2024 13:14:47 +0100 Subject: utils: checkstyle.py: Update LogCategoryChecker regexp The regexp uses obsolete form, update it to mute the warning emitted by Python 3.12: SyntaxWarning: invalid escape sequence '\(' Signed-off-by: Milan Zamazal Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index af553cfd..fb03dc34 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -588,7 +588,7 @@ class IncludeChecker(StyleChecker): class LogCategoryChecker(StyleChecker): - log_regex = re.compile('\\bLOG\((Debug|Info|Warning|Error|Fatal)\)') + log_regex = re.compile(r'\bLOG\((Debug|Info|Warning|Error|Fatal)\)') patterns = ('*.cpp',) def __init__(self, content): -- cgit v1.2.1