Skip to content

Commit a6bd2ed

Browse files
authored
Fixes <string>:1: SyntaxWarning: invalid escape sequence '\(' (#526)
1 parent 1d19067 commit a6bd2ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/include/macros.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
#ifdef CRAY_ACC_WAR
3232
allocate (${', '.join(('p_' + arg.strip() for arg in args))}$)
3333
#:for arg in args
34-
${re.sub('\(.*\)','',arg)}$ => ${ 'p_' + re.sub('\(.*\)','',arg.strip()) }$
34+
${re.sub('\\(.*\\)','',arg)}$ => ${ 'p_' + re.sub('\\(.*\\)','',arg.strip()) }$
3535
#:endfor
36-
!$acc enter data create(${', '.join(('p_' + re.sub('\(.*\)','',arg.strip()) for arg in args))}$) &
37-
!$acc& attach(${', '.join(map(lambda x: re.sub('\(.*\)','',x), args))}$)
36+
!$acc enter data create(${', '.join(('p_' + re.sub('\\(.*\\)','',arg.strip()) for arg in args))}$) &
37+
!$acc& attach(${', '.join(map(lambda x: re.sub('\\(.*\\)','',x), args))}$)
3838
#else
3939
allocate (${', '.join(args)}$)
4040
!$acc enter data create(${', '.join(args)}$)

0 commit comments

Comments
 (0)