Description: Fix syntax warnings
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2025-01-06
Forwarded: no
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085420

--- a/LibCV/PrePARE/PrePARE.py
+++ b/LibCV/PrePARE/PrePARE.py
@@ -624,7 +624,7 @@
                     table_value = " ".join(table_value.split())
                 if key == "cell_measures":
                     # Check if area and volume values from the table's cell_measures are found in the file's external_variables
-                    pattern = re.compile('(?:area|volume): (\w+)')
+                    pattern = re.compile(r"(?:area|volume): (\w+)")
                     values = re.findall(pattern, table_value)
                     for v in values:
                         if 'external_variables' in list(self.dictGbl.keys()):
@@ -830,7 +830,7 @@
         '--ignore-dir',
         metavar="PYTHON_REGEX",
         type=str,
-        default='^.*/\.[\w]*$',
+        default=r'^.*/\.[\w]*$',
         help='Filter directories NON-matching the regular expression.\n'
              'Default ignores paths with folder name(s) starting with "."')
 
@@ -883,12 +883,12 @@
         file_filters.extend([(f, True) for f in args.include_file])
     else:
         # Default includes netCDF only
-        file_filters.append(('^.*\.nc$', True))
+        file_filters.append((r'^.*\.nc$', True))
     if args.exclude_file:
         # Default exclude hidden files
         file_filters.extend([(f, False) for f in args.exclude_file])
     else:
-        file_filters.append(('^\..*$', False))
+        file_filters.append((r'^\..*$', False))
     # Init collector file filter
     for regex, inclusive in file_filters:
         sources.FileFilter.add(regex=regex, inclusive=inclusive)
