Repository navigation
refactor: move FunctionToOptimize to models/function_types to fix circular imports - #1285
Merged
Merged
Conversation
misrasaurabh1
force-pushed
the
fix/move-function-to-optimize-to-models
branch
from
February 3, 2026 04:00
f99cec4 to
371ee1e
Compare
…cular imports The FunctionToOptimize class was defined in discovery/functions_to_optimize.py which has many heavy dependencies (API calls, registry, etc). This caused circular import issues when modules that needed FunctionToOptimize also needed env_utils. Moving FunctionToOptimize to models/function_types.py (which is designed to be dependency-free) breaks the circular import chain. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
misrasaurabh1
force-pushed
the
fix/move-function-to-optimize-to-models
branch
from
February 3, 2026 04:04
371ee1e to
fd59fb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FunctionToOptimizeclass fromdiscovery/functions_to_optimize.pytomodels/function_types.pyenv_utils→registry→javascript/support→functions_to_optimize→cfapi→env_utilsmodels/function_types.pymodule is designed to be dependency-freeTest plan
from codeflash.discovery.functions_to_optimize import FunctionToOptimizefrom codeflash.models.function_types import FunctionToOptimize🤖 Generated with Claude Code