Skip to content

Commit b1056f8

Browse files
committed
formatting
1 parent 51a3fe1 commit b1056f8

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

codeflash/optimization/function_optimizer.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import queue
77
import random
88
import subprocess
9-
import time
109
import uuid
1110
from collections import defaultdict
1211
from pathlib import Path
@@ -1667,9 +1666,7 @@ def establish_original_code_baseline(
16671666
finally:
16681667
if self.function_to_optimize.is_async:
16691668
self.write_code_and_helpers(
1670-
self.function_to_optimize_source_code,
1671-
original_helper_code,
1672-
self.function_to_optimize.file_path,
1669+
self.function_to_optimize_source_code, original_helper_code, self.function_to_optimize.file_path
16731670
)
16741671

16751672
console.print(
@@ -1739,7 +1736,7 @@ def run_optimized_candidate(
17391736
original_helper_code: dict[Path, str],
17401737
file_path_to_helper_classes: dict[Path, set[str]],
17411738
) -> Result[OptimizedCandidateResult, str]:
1742-
assert (test_framework := self.args.test_framework) in {"pytest", "unittest"} # noqa: RUF018
1739+
assert (test_framework := self.args.test_framework) in {"pytest", "unittest"}
17431740

17441741
with progress_bar("Testing optimization candidate"):
17451742
test_env = self.get_test_env(
@@ -1822,11 +1819,7 @@ def run_optimized_candidate(
18221819
)
18231820
loop_count = (
18241821
max(all_loop_indices)
1825-
if (
1826-
all_loop_indices := {
1827-
result.loop_index for result in candidate_benchmarking_results.test_results
1828-
}
1829-
)
1822+
if (all_loop_indices := {result.loop_index for result in candidate_benchmarking_results.test_results})
18301823
else 0
18311824
)
18321825

codeflash/verification/parse_test_output.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,7 @@ def parse_test_results(
514514
run_result: subprocess.CompletedProcess | None = None,
515515
) -> tuple[TestResults, CoverageData | None]:
516516
test_results_xml = parse_test_xml(
517-
test_xml_path,
518-
test_files=test_files,
519-
test_config=test_config,
520-
run_result=run_result,
517+
test_xml_path, test_files=test_files, test_config=test_config, run_result=run_result
521518
)
522519
try:
523520
bin_results_file = get_run_tmp_file(Path(f"test_return_values_{optimization_iteration}.bin"))

0 commit comments

Comments
 (0)