Skip to content

Commit d1a6b2a

Browse files
committed
removinf '\s' warnings from regexps
1 parent 64362a0 commit d1a6b2a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/PlumedToHTML/PlumedToHTML.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ def get_cltoolarg_html( inpt, name, plumedexe ) :
231231
"""
232232
# Get the cltool that we are using
233233
pl, tool = inpt.split()[0], inpt.split()[1]
234-
if re.search("^mpirun\s+-np\s+[0-9]+\s+plumed",inpt) :
234+
if re.search(r"^mpirun\s+-np\s+[0-9]+\s+plumed",inpt) :
235235
tool = inpt.split()[4]
236236
pl = inpt.split()[3]
237-
if re.search("^plumed\s+\--no-mpi\s+", inpt) :
237+
if re.search(r"^plumed\s+\--no-mpi\s+", inpt) :
238238
tool = inpt.split()[2]
239239
if pl!="plumed" and pl!="plumed-runtime" :
240240
raise Exception("first word in the command should be plumed or plumed-runtime")
@@ -712,13 +712,14 @@ def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, ofil
712712
usemermaid = ""
713713
# Create a collection of cltools to regexp for
714714
plumed_syntax = getPlumedSyntax( plumedexe )
715-
cltoolregexps, clfileregexps = [], []
715+
cltoolregexps = []
716+
clfileregexps = []
716717
for key, data in plumed_syntax["cltools"].items() :
717-
cltoolregexps.append("plumed\s+" + key )
718-
cltoolregexps.append("plumed\s+--no-mpi\s+" + key )
719-
cltoolregexps.append("plumed-runtime\s+" + key )
718+
cltoolregexps.append(r"plumed\s+" + key )
719+
cltoolregexps.append(r"plumed\s+--no-mpi\s+" + key )
720+
cltoolregexps.append(r"plumed-runtime\s+" + key )
720721
if data["inputtype"]=="file" :
721-
clfileregexps.append( "#TOOL\s*=\s*" + key )
722+
clfileregexps.append( r"#TOOL\s*=\s*" + key )
722723

723724
for line in inp.splitlines() :
724725
# Detect and copy plumed input files

0 commit comments

Comments
 (0)