Skip to content

Commit 4a6b95c

Browse files
comment out unused var
1 parent 07be9e7 commit 4a6b95c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

commit0/harness/execution_context.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
128128
exit_code, test_output = self._exec_run(f"test -e {report_file}")
129129
# Check the exit code of the command
130130
if exit_code == 0:
131-
copy_from_container(self.container, report_file, self.log_dir / "report.json")
131+
copy_from_container(
132+
self.container, report_file, self.log_dir / "report.json"
133+
)
132134
delete_file_from_container(self.container, str(report_file))
133135
return output
134136

@@ -170,7 +172,6 @@ def __init__(
170172

171173
def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
172174
"""Execute command on modal sandbox"""
173-
174175
with modal.Volume.ephemeral() as vol:
175176
# copy back report.json if there is any
176177
report_file = Path(self.spec.repo_directory) / "report.json"
@@ -194,7 +195,8 @@ def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
194195
stderr = read_stream(self.sandbox.stderr)
195196
print(stderr)
196197

197-
return_code = self.sandbox.returncode
198+
# return_code = self.sandbox.returncode
199+
# maybe use return_code for timeout info?
198200

199201
with (self.log_dir / "report.json").open("wb") as f:
200202
for data in vol.read_file("report.json"):

commit0/harness/run_pytest_ids.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def main(
9292
)
9393

9494
try:
95-
with execution_context(spec, logger, timeout, log_dir, files_to_copy) as context:
95+
with execution_context(
96+
spec, logger, timeout, log_dir, files_to_copy
97+
) as context:
9698
output, timed_out, total_runtime = context.exec_run_with_timeout(
9799
"/bin/bash /eval.sh"
98100
)

0 commit comments

Comments
 (0)