@@ -179,8 +179,6 @@ def get_functions_to_optimize(
179179 project_root : Path ,
180180 module_root : Path ,
181181 previous_checkpoint_functions : dict [str , dict [str , str ]] | None = None ,
182- * ,
183- enable_async : bool = False ,
184182) -> tuple [dict [Path , list [FunctionToOptimize ]], int , Path | None ]:
185183 assert sum ([bool (optimize_all ), bool (replay_test ), bool (file )]) <= 1 , (
186184 "Only one of optimize_all, replay_test, or file should be provided"
@@ -242,13 +240,7 @@ def get_functions_to_optimize(
242240 ph ("cli-optimizing-git-diff" )
243241 functions = get_functions_within_git_diff (uncommitted_changes = False )
244242 filtered_modified_functions , functions_count = filter_functions (
245- functions ,
246- test_cfg .tests_root ,
247- ignore_paths ,
248- project_root ,
249- module_root ,
250- previous_checkpoint_functions ,
251- enable_async = enable_async ,
243+ functions , test_cfg .tests_root , ignore_paths , project_root , module_root , previous_checkpoint_functions
252244 )
253245
254246 logger .info (f"!lsp|Found { functions_count } function{ 's' if functions_count > 1 else '' } to optimize" )
@@ -658,7 +650,6 @@ def filter_functions(
658650 previous_checkpoint_functions : dict [Path , dict [str , Any ]] | None = None ,
659651 * ,
660652 disable_logs : bool = False ,
661- enable_async : bool = False ,
662653) -> tuple [dict [Path , list [FunctionToOptimize ]], int ]:
663654 filtered_modified_functions : dict [str , list [FunctionToOptimize ]] = {}
664655 blocklist_funcs = get_blocklisted_functions ()
@@ -678,7 +669,6 @@ def filter_functions(
678669 submodule_ignored_paths_count : int = 0
679670 blocklist_funcs_removed_count : int = 0
680671 previous_checkpoint_functions_removed_count : int = 0
681- async_functions_removed_count : int = 0
682672 tests_root_str = str (tests_root )
683673 module_root_str = str (module_root )
684674
@@ -734,15 +724,6 @@ def filter_functions(
734724 functions_tmp .append (function )
735725 _functions = functions_tmp
736726
737- if not enable_async :
738- functions_tmp = []
739- for function in _functions :
740- if function .is_async :
741- async_functions_removed_count += 1
742- continue
743- functions_tmp .append (function )
744- _functions = functions_tmp
745-
746727 filtered_modified_functions [file_path ] = _functions
747728 functions_count += len (_functions )
748729
@@ -756,7 +737,6 @@ def filter_functions(
756737 "Files from ignored submodules" : (submodule_ignored_paths_count , "bright_black" ),
757738 "Blocklisted functions removed" : (blocklist_funcs_removed_count , "bright_red" ),
758739 "Functions skipped from checkpoint" : (previous_checkpoint_functions_removed_count , "green" ),
759- "Async functions removed" : (async_functions_removed_count , "bright_magenta" ),
760740 }
761741 tree = Tree (Text ("Ignored functions and files" , style = "bold" ))
762742 for label , (count , color ) in log_info .items ():
0 commit comments