Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3cbd6b7
feat(optimizer): Implement targeted formatting (CF-637)
zomglings May 14, 2025
a10600c
Fixed changes to the FunctionOptimizer
zomglings May 14, 2025
bcba527
CODEFLASH_DISABLE_TELEMETRY environment variable can be set to disabl…
zomglings May 14, 2025
36da640
Added bubble sort implementation with bad formatting in non-optimized…
zomglings May 14, 2025
85fd3c0
Added a file containing a bubble sort method in a class
zomglings May 14, 2025
ce33708
Merge branch 'main' into targeted-formatting
zomglings May 14, 2025
2c40018
Added "scratch/" directory to .gitignore
zomglings May 14, 2025
82b9d41
Cleaned up the import sorting code in FunctionOptimizer
zomglings May 15, 2025
ce87832
Added test for sort_imports_in_place
zomglings May 15, 2025
0373bfa
Reverted changes to optimizer and formatter on targeted-formatting br…
zomglings May 16, 2025
81dbb33
Merge branch 'main' into targeted-formatting-cst-based
zomglings May 16, 2025
9345d80
Started work on targeted formatting using the CST
zomglings May 16, 2025
bfc8423
TODO
zomglings May 16, 2025
91fe6a7
Updated implementation of FunctionOptimizer.reformat_code_and_helpers
zomglings May 16, 2025
b89622c
Fixed a few bugs in reformat_code_and_helpers
zomglings May 16, 2025
5a9265c
More codeposition bugs
zomglings May 16, 2025
b903d1a
Issue with splicing
zomglings May 16, 2025
16ca27e
Fixing more bugs, testing live...
zomglings May 16, 2025
59e3667
Got it functional
zomglings May 16, 2025
c3b8063
Do not recalculate code_context when reformatting
zomglings May 16, 2025
6dd72cf
Correct calculation of all preexisting "function" symbols for formatt…
zomglings May 17, 2025
eae756a
Clarified docstring for get_modification_code_ranges
zomglings May 17, 2025
05817f9
removed xylophone
zomglings May 17, 2025
9efdc21
Added test for get_modification_code_ranges.
zomglings May 19, 2025
b6baf05
Merge branch 'main' into targeted-formatting-cst-based
zomglings May 21, 2025
9face63
"ruff check --fix"
zomglings May 21, 2025
0615f55
Fixed some more ruff check issues
zomglings May 21, 2025
af4df4a
"ruff format"
zomglings May 21, 2025
cf4a665
more fixes for "ruff check"...
zomglings May 21, 2025
d43862e
ruff format...
zomglings May 21, 2025
6ec5ef0
That should be hte last of the ruff stuff
zomglings May 21, 2025
a468ba7
Added a test for FunctionOptimizer.reformat_code_and_helpers
zomglings May 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion codeflash/optimization/function_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ def optimize_function(self) -> Result[BestOptimization, str]:

self.log_successful_optimization(explanation, generated_tests, exp_type)

# xylophone
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xylophone? 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy to grep, should be gone. :)

preexisting_functions_by_filepath: dict[Path, list[str]] = {}
filepaths_to_inspect = [self.function_to_optimize.file_path] + list({helper.file_path for helper in code_context.helper_functions})
for filepath in filepaths_to_inspect:
Expand Down
Loading