Skip to content

Commit 9d31359

Browse files
committed
typo
1 parent e078d3b commit 9d31359

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

codeflash/code_utils/edit_generated_tests.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ class CfoVisitor(ast.NodeVisitor):
5050
and reports their location relative to the function they're in.
5151
"""
5252

53-
def __init__(self, qualifed_name: str, source_code: str) -> None:
53+
def __init__(self, qualified_name: str, source_code: str) -> None:
5454
self.source_lines = source_code.splitlines()
55-
self.name = qualifed_name.split(".")[-1]
55+
self.name = qualified_name.split(".")[-1]
5656
self.results: list[int] = [] # map actual line number to line number in ast
5757

5858
def visit_Call(self, node): # type: ignore[no-untyped-def] # noqa: ANN201, ANN001
@@ -71,15 +71,15 @@ def _get_called_func_name(self, node): # type: ignore[no-untyped-def] # noqa: A
7171
return None
7272

7373

74-
def find_codeflash_output_assignments(qualifed_name: str, source_code: str) -> list[int]:
74+
def find_codeflash_output_assignments(qualified_name: str, source_code: str) -> list[int]:
7575
tree = ast.parse(source_code)
76-
visitor = CfoVisitor(qualifed_name, source_code)
76+
visitor = CfoVisitor(qualified_name, source_code)
7777
visitor.visit(tree)
7878
return visitor.results
7979

8080

8181
def add_runtime_comments_to_generated_tests(
82-
qualifed_name: str,
82+
qualified_name: str,
8383
test_cfg: TestConfig,
8484
generated_tests: GeneratedTestsList,
8585
original_runtimes: dict[InvocationId, list[int]],
@@ -119,7 +119,7 @@ def visit_FunctionDef(self, node: cst.FunctionDef) -> None:
119119
body_code = dedent(self.module.code_for_node(node.body))
120120
normalized_body_code = ast.unparse(ast.parse(body_code))
121121
self.cfo_locs = sorted(
122-
find_codeflash_output_assignments(qualifed_name, normalized_body_code)
122+
find_codeflash_output_assignments(qualified_name, normalized_body_code)
123123
) # sorted in order we will encounter them
124124
self.cfo_idx_loc_to_look_at = -1
125125
self.context_stack.append(node.name.value)
@@ -241,7 +241,7 @@ def visit_Call(self, call_node) -> None: # type: ignore[no-untyped-def] # noqa
241241
tree = cst.parse_module(test.generated_original_test_source)
242242
# Transform the tree to add runtime comments
243243
# qualified_name: str, module: cst.Module, test: GeneratedTests, tests_root: Path, rel_tests_root: Path
244-
transformer = RuntimeCommentTransformer(qualifed_name, tree, test, tests_root, rel_tests_root)
244+
transformer = RuntimeCommentTransformer(qualified_name, tree, test, tests_root, rel_tests_root)
245245
modified_tree = tree.visit(transformer)
246246

247247
# Convert back to source code

codeflash/optimization/function_optimizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,10 +1012,10 @@ def find_and_process_best_optimization(
10121012
optimized_runtime_by_test = (
10131013
best_optimization.winning_benchmarking_test_results.usable_runtime_data_by_test_case()
10141014
)
1015-
qualifed_name = self.function_to_optimize.qualified_name_with_modules_from_root(self.project_root)
1015+
qualified_name = self.function_to_optimize.qualified_name_with_modules_from_root(self.project_root)
10161016
# Add runtime comments to generated tests before creating the PR
10171017
generated_tests = add_runtime_comments_to_generated_tests(
1018-
qualifed_name,
1018+
qualified_name,
10191019
self.test_cfg,
10201020
generated_tests,
10211021
original_runtime_by_test,
@@ -1025,7 +1025,7 @@ def find_and_process_best_optimization(
10251025
[test.generated_original_test_source for test in generated_tests.generated_tests]
10261026
)
10271027
existing_tests = existing_tests_source_for(
1028-
qualifed_name,
1028+
qualified_name,
10291029
function_to_all_tests,
10301030
test_cfg=self.test_cfg,
10311031
original_runtimes_all=original_runtime_by_test,

0 commit comments

Comments
 (0)