Skip to content

Commit

Permalink
Fixes <string>:1: SyntaxWarning: invalid escape sequence '\(' (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryngelson authored Jul 18, 2024
1 parent 1d19067 commit a6bd2ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/include/macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
#ifdef CRAY_ACC_WAR
allocate (${', '.join(('p_' + arg.strip() for arg in args))}$)
#:for arg in args
${re.sub('\(.*\)','',arg)}$ => ${ 'p_' + re.sub('\(.*\)','',arg.strip()) }$
${re.sub('\\(.*\\)','',arg)}$ => ${ 'p_' + re.sub('\\(.*\\)','',arg.strip()) }$
#:endfor
!$acc enter data create(${', '.join(('p_' + re.sub('\(.*\)','',arg.strip()) for arg in args))}$) &
!$acc& attach(${', '.join(map(lambda x: re.sub('\(.*\)','',x), args))}$)
!$acc enter data create(${', '.join(('p_' + re.sub('\\(.*\\)','',arg.strip()) for arg in args))}$) &
!$acc& attach(${', '.join(map(lambda x: re.sub('\\(.*\\)','',x), args))}$)
#else
allocate (${', '.join(args)}$)
!$acc enter data create(${', '.join(args)}$)
Expand Down

0 comments on commit a6bd2ed

Please sign in to comment.