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 <nicolas@ndufresne.ca>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Paul Elder 2024-01-22 20:01:04 +09:00 committed by Laurent Pinchart
parent e683297374
commit 81791d2cac

View file

@ -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):