Skip to content

Commit

Permalink
Fix evaluate_run.py after refactoring (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen authored Aug 29, 2024
1 parent 5d0655c commit 234393b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ai/src/evaluate_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ def process_directory(directory_path: str):
if segments[1] == "no_source":
content = ""
else:
input_source_path = os.path.join(
"src/ai/offline_common", urllib.parse.unquote(segments[1])
)
# Read the original content if it's not a "no_source" file
with open(urllib.parse.unquote(segments[1])) as f:
with open(input_source_path) as f:
content = f.read()

patch_result = apply_patch(original_code=content, patch=patch)
Expand Down

0 comments on commit 234393b

Please sign in to comment.