Skip to content

Commit 3d180c2

Browse files
committed
updated parse response to return None on unparseable predictions
1 parent a9e2cf2 commit 3d180c2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tests/test_maker.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ def parse_response(self, response: str) -> Step | None:
218218
pattern = r"<step>\s*(\d+)\s*,\s*(\d+)\s*</step>"
219219
m = re.search(pattern, response)
220220
if not m:
221-
raise ValueError(
222-
f"No valid <step>start,end</step> tag found in: {response!r}"
223-
)
221+
return None
224222
return Step(int(m.group(1)), int(m.group(2)))
225223

226224
def has_no_red_flags(self, response: str) -> Step | None:

0 commit comments

Comments
 (0)