Skip to content

Commit d1ae932

Browse files
committed
don't count nested functions as it's own func
1 parent f80a076 commit d1ae932

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

codeflash/discovery/functions_to_optimize.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ def visit_FunctionDef(self, node: FunctionDef) -> None:
9494
self.functions.append(
9595
FunctionToOptimize(function_name=node.name, file_path=self.file_path, parents=self.ast_path[:])
9696
)
97-
# Continue visiting the body of the function to find nested functions
98-
self.generic_visit(node)
9997

10098
def generic_visit(self, node: ast.AST) -> None:
10199
if isinstance(node, (FunctionDef, AsyncFunctionDef, ClassDef)):

0 commit comments

Comments
 (0)