Skip to content

Commit 4da41e6

Browse files
committed
Allow floating point values
1 parent d76c027 commit 4da41e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wdl/wavgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ def loadWDL(infile, outfile="/dev/null", verbose=1):
134134
Parameters.update({pname: pval})
135135
continue
136136
# look for constants
137-
match = re.search("^constant\s+(\w+)=(\d+)\s*$", line)
137+
match = re.search(r"^constant\s+(\w+)\s*=\s*([+-]?\d+(?:\.\d*)?)\s*$", line)
138138
if match is not None:
139139
cname = match.group(1)
140-
cval = int(match.group(2))
140+
cval = float(match.group(2))
141141
Constants.update({cname: cval})
142142
continue
143143
# look for a label

0 commit comments

Comments
 (0)