File: py3.13-syntax.patch

package info (click to toggle)
cmor 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 17,140 kB
  • sloc: ansic: 28,637; f90: 13,872; python: 13,364; sh: 3,731; makefile: 108
file content (41 lines) | stat: -rw-r--r-- 1,776 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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)