From 815305b94864556c994934c7a7c830da7de1d94e Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 25 Feb 2024 17:40:19 +0100 Subject: Use Python raw strings for regex methods argument --- test/CheckTexinfo.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/CheckTexinfo.py') diff --git a/test/CheckTexinfo.py b/test/CheckTexinfo.py index 7b13c50e..8a32d2c4 100755 --- a/test/CheckTexinfo.py +++ b/test/CheckTexinfo.py @@ -28,10 +28,10 @@ class CheckTexinfo (CheckOptions): fun_doc = str() fun_example = False item_regex = re.compile(self.function_pattern) - itemx_regex = re.compile('^@defunx') - example_regex = re.compile('^@smallexample\s+@c\s+command:') - fix_regex = re.compile('FIX') - comment_regex = re.compile('^\s*@c') + itemx_regex = re.compile(r'^@defunx') + example_regex = re.compile(r'^@smallexample\s+@c\s+command:') + fix_regex = re.compile(r'FIX') + comment_regex = re.compile(r'^\s*@c') for line in open(filename): line = line.strip() if state == state_normal: @@ -62,9 +62,9 @@ class CheckTexinfo (CheckOptions): option = None opt_doc = str() item_regex = re.compile(self.option_pattern) - itemx_regex = re.compile('^@itemx') - fix_regex = re.compile('FIX') - comment_regex = re.compile('^\s*@c') + itemx_regex = re.compile(r'^@itemx') + fix_regex = re.compile(r'FIX') + comment_regex = re.compile(r'^\s*@c') for line in open(filename): line = line.strip() if state == state_normal: -- cgit v1.2.3