Skip to content

Commit 6a9390c

Browse files
typo
1 parent 97f2426 commit 6a9390c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,12 +1951,11 @@ def run_optimized_candidate(
19511951
return Failure("Code repair failed to generate a valid candidate.")
19521952

19531953
code_print(new_candidate.source_code.flat)
1954-
1955-
normalized_code = normalize_code(candidate.source_code.flat.strip())
1954+
normalized_code = normalize_code(new_candidate.source_code.flat.strip())
19561955
self.ast_code_to_id[normalized_code] = {
1957-
"optimization_id": candidate.optimization_id,
1958-
"shorter_source_code": candidate.source_code,
1959-
"diff_len": diff_length(candidate.source_code.flat, code_context.read_writable_code.flat),
1956+
"optimization_id": new_candidate.optimization_id,
1957+
"shorter_source_code": new_candidate.source_code,
1958+
"diff_len": diff_length(new_candidate.source_code.flat, code_context.read_writable_code.flat),
19601959
}
19611960

19621961
try:

0 commit comments

Comments
 (0)