Skip to content

Commit b438243

Browse files
Merge branch 'feat/feedback-loop-for-unmatched-test-results' of github.com:codeflash-ai/codeflash into feat/feedback-loop-for-unmatched-test-results
2 parents b5ca2b4 + 4dea247 commit b438243

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

codeflash/models/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ def parse_markdown_code(markdown_code: str) -> CodeStringsMarkdown:
272272
273273
"""
274274
matches = markdown_pattern.findall(markdown_code)
275-
results = CodeStringsMarkdown()
275+
code_string_list = []
276+
for file_path, code in matches:
277+
path = file_path.strip()
278+
code_string_list.append(CodeString(code=code, file_path=Path(path)))
276279
try:
277-
for file_path, code in matches:
278-
path = file_path.strip()
279-
results.code_strings.append(CodeString(code=code, file_path=Path(path)))
280-
return results # noqa: TRY300
280+
return CodeStringsMarkdown(code_strings=code_string_list)
281281
except ValidationError:
282282
# if any file is invalid, return an empty CodeStringsMarkdown for the entire context
283283
return CodeStringsMarkdown()

0 commit comments

Comments
 (0)