Skip to content

Commit ae9adaa

Browse files
committed
test wf changes(test PR)
1 parent 142b0b4 commit ae9adaa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

codeflash/context/code_context_extractor.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_code_optimization_context(
7575
tokenizer = tiktoken.encoding_for_model("gpt-4o")
7676
final_read_writable_tokens = len(tokenizer.encode(final_read_writable_code))
7777
if final_read_writable_tokens > optim_token_limit:
78-
raise ValueError("Read-writable code has exceeded token limit, cannot proceed")
78+
raise ValueError("Exceeded token limit, cannot proceed")
7979

8080
# Setup preexisting objects for code replacer
8181
preexisting_objects = set(
@@ -413,7 +413,12 @@ def get_function_sources_from_jedi(
413413
and not belongs_to_function_qualified(definition, qualified_function_name)
414414
and definition.full_name.startswith(definition.module_name)
415415
# Avoid nested functions or classes. Only class.function is allowed
416-
and len((qualified_name := get_qualified_name(definition.module_name, definition.full_name)).split(".")) <= 2
416+
and len(
417+
(qualified_name := get_qualified_name(definition.module_name, definition.full_name)).split(
418+
"."
419+
)
420+
)
421+
<= 2
417422
):
418423
function_source = FunctionSource(
419424
file_path=definition_path,

0 commit comments

Comments
 (0)