Skip to content

Commit 31ec69b

Browse files
committed
fix: remove unused variable in test_benchmarks.py
Removed the unused `result` variable assignment in the test_custom_progress_callback function. The test only needs to verify callback invocations, not the return value. This fixes the ruff F841 linting error that was causing CI failures.
1 parent 6106626 commit 31ec69b

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎tests/benchmarks/test_benchmarks.py‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ def custom_inference(sample):
299299
)
300300

301301
# All samples should be correct (temp files weren't clobbered)
302-
assert result.accuracy == 1.0, f"Some samples were clobbered: {[sr for sr in result.sample_results if not sr.is_correct]}"
302+
assert result.accuracy == 1.0, (
303+
f"Some samples were clobbered: {[sr for sr in result.sample_results if not sr.is_correct]}"
304+
)
303305

304306
# Verify multiple threads were used
305307
unique_threads = set(thread_ids.values())
@@ -398,19 +400,21 @@ def test_progress_callback_invoked(self):
398400
callback_invocations = []
399401

400402
def track_callback(completed, total, sample_result, stats):
401-
callback_invocations.append({
402-
"completed": completed,
403-
"total": total,
404-
"accuracy": stats.accuracy,
405-
})
403+
callback_invocations.append(
404+
{
405+
"completed": completed,
406+
"total": total,
407+
"accuracy": stats.accuracy,
408+
}
409+
)
406410

407411
benchmark = NIAHBenchmark(context_length=1000)
408412
runner = BenchmarkRunner(
409413
progress="none",
410414
progress_callback=track_callback,
411415
)
412416

413-
result = runner.run(
417+
runner.run(
414418
benchmark,
415419
method="custom",
416420
custom_fn=lambda s: s.expected_answer,

0 commit comments

Comments
 (0)