From 7e21e27ca9306da5f3b902061cf97d11ee03890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Fri, 31 May 2024 22:54:13 +0200 Subject: [PATCH] docs: gen-api-gtkdoc.py: fix SyntaxWarning with raw strings Use raw strings for regex patterns to avoid the invalid escape sequence `SyntaxWarning`. --- docs/gen-api-gtkdoc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/gen-api-gtkdoc.py b/docs/gen-api-gtkdoc.py index c816ba3a..9a004839 100644 --- a/docs/gen-api-gtkdoc.py +++ b/docs/gen-api-gtkdoc.py @@ -130,7 +130,7 @@ class DoxygenProcess(object): def __process_element(self, xml): s = "" - if xml.text and re.search('\S', xml.text): + if xml.text and re.search(r'\S', xml.text): s += xml.text for n in xml.getchildren(): if n.tag == "emphasis": @@ -143,7 +143,7 @@ class DoxygenProcess(object): s += " - " + self.__process_element(n) if n.tag == "para": p = self.__process_element(n) - if re.search('\S', p): + if re.search(r'\S', p): s += p + "\n" if n.tag == "ref": s += n.text if n.text else "" @@ -168,7 +168,7 @@ class DoxygenProcess(object): if n.tag == "htmlonly": s += "" if n.tail: - if re.search('\S', n.tail): + if re.search(r'\S', n.tail): s += n.tail if n.tag.startswith("param"): pass # parameters are handled separately in DoxyFunction::from_memberdef()