From 81791d2cac70a3f549db85fb2e40e385b24e76fc Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Mon, 22 Jan 2024 20:01:04 +0900 Subject: utils: ipc: extract-docs: Fix escape characters in regex Newer versions of python now generate a SyntaxWarning (SyntaxError in the future [1]) for invalid escape sequences. Fix this, as there were invalid escape sequences in the regexes: "libcamera/utils/ipc/./extract-docs.py:13: SyntaxWarning: invalid escape sequence '\/'" [1] https://docs.python.org/3.12/library/re.html Reported-by: Nicolas Dufresne Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Tested-by: Nicolas Dufresne Signed-off-by: Laurent Pinchart --- utils/ipc/extract-docs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/ipc/extract-docs.py b/utils/ipc/extract-docs.py index 8f7fff9f..c2050c99 100755 --- a/utils/ipc/extract-docs.py +++ b/utils/ipc/extract-docs.py @@ -10,9 +10,9 @@ import argparse import re import sys -regex_block_start = re.compile('^\/\*\*$') -regex_block_end = re.compile('^ \*\/$') -regex_spdx = re.compile('^\/\* SPDX-License-Identifier: .* \*\/$') +regex_block_start = re.compile(r'^/\*\*$') +regex_block_end = re.compile(r'^ \*/$') +regex_spdx = re.compile(r'^/\* SPDX-License-Identifier: .* \*/$') def main(argv): -- cgit v1.2.1