Skip to content

Commit 477fc2a

Browse files
committed
Update code_context_extractor.py
1 parent 685f52a commit 477fc2a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

codeflash/context/code_context_extractor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,14 @@ def parse_code_and_prune_cst(
491491
module, target_functions, helpers_of_helper_functions, remove_docstrings=remove_docstrings
492492
)
493493
else:
494-
msg = f"Unknown code_context_type: {code_context_type}"
495-
raise TypeError(msg)
494+
raise TypeError(f"Unknown code_context_type: {code_context_type}") # noqa: EM102
496495

497496
if not found_target:
498497
raise ValueError("No target functions found in the provided code")
499498
if filtered_node and isinstance(filtered_node, cst.Module):
500499
return str(filtered_node.code)
501500
return ""
502501

503-
504502
def prune_cst_for_read_writable_code( # noqa: PLR0911
505503
node: cst.CSTNode, target_functions: set[str], prefix: str = ""
506504
) -> tuple[cst.CSTNode | None, bool]:

0 commit comments

Comments
 (0)