From a82517d16bc7ea20b65c446faab0e834f201988f Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Wed, 29 May 2024 16:30:05 +0200
Subject: [PATCH] subs: fix python warning issues wth literal strings

---
 modules/precision_generator/subs.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/precision_generator/subs.py b/modules/precision_generator/subs.py
index ec6ef53..942f18a 100644
--- a/modules/precision_generator/subs.py
+++ b/modules/precision_generator/subs.py
@@ -124,8 +124,8 @@ _subs = {
     + [
 
         # ----- Fortran Types
-        ('real\(kind=c_double\)', 'complex\(kind=c_double_complex\)' ),
-        ('real\(kind=c_float\)',  'real\(kind=c_float_complex\)'     ),
+        (r'real\(kind=c_double\)', r'complex\(kind=c_double_complex\)' ),
+        (r'real\(kind=c_float\)',  r'real\(kind=c_float_complex\)'     ),
 
         # ----- Data types
         ('double',               'double2'             ),
@@ -159,8 +159,8 @@ _subs = {
         #('plasma_s',             'plasma_c'            ),
 
         # ----- Fortran examples
-        ('real\(',               'complex\(',          ),
-        ('\(transpose\(',        'conjg\(transpose\('  ),
+        (r'real\(',             r'complex\(',          ),
+        (r'\(transpose\(',      r'conjg\(transpose\('  ),
     ],  # end mixed
 
     # ------------------------------------------------------------
@@ -178,7 +178,7 @@ _subs = {
         ('Symmetric',            'Symmetric',            'Symmetric',            'Hermitian',            'Hermitian'           ),
         ('SYMMETRIC',            'SYMMETRIC',            'SYMMETRIC',            'HERMITIAN',            'HERMITIAN'           ),
         ('orthogonal',           'orthogonal',           'orthogonal',           'unitary',              'unitary'             ),
-        ('\^T',                  '\^T',                  '\^T',                  '\^H',                  '\^H'                 ),
+        (r'\^T',                r'\^T',                 r'\^T',                 r'\^H',                 r'\^H'                 ),
 
         # ----- CBLAS
         ('',                     '',                     '',                     'CBLAS_SADDR',          'CBLAS_SADDR'         ),
@@ -209,7 +209,7 @@ _subs = {
     + _upper( lapack )  # e.g., DGETRF
     + [
         # ----- Fortran Types
-        ('int\(',                'real\(',               'real\(',               'complex\(',            'complex\('           ),
+        (r'int\(',              r'real\(',              r'real\(',              r'complex\(',           r'complex\('           ),
         ('int',                  'real',                 'double precision',     'real',                r'\bdouble precision\b'),  # before double
         ('_int',                 '_float',               '_double',              '_complex',             '_double_complex'     ),
         (r'\bint',              r'\bfloat',             r'\bdouble',            r'\bcomplex',           r'\bdouble_complex'    ),
-- 
GitLab