File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -605,9 +605,12 @@ def reformat_code_and_helpers(
605605 new_code = sort_imports (new_code )
606606
607607 new_helper_code : dict [Path , str ] = {}
608- helper_functions_paths = {hf .file_path for hf in helper_functions }
609- for module_abspath in helper_functions_paths :
610- formatted_helper_code = format_code (self .args .formatter_cmds , module_abspath )
608+ for hp in helper_functions :
609+ module_abspath = hp .file_path
610+ hp_source_code = hp .source_code
611+ formatted_helper_code = format_code (
612+ self .args .formatter_cmds , module_abspath , optimized_function = hp_source_code
613+ )
611614 if should_sort_imports :
612615 formatted_helper_code = sort_imports (formatted_helper_code )
613616 new_helper_code [module_abspath ] = formatted_helper_code
You can’t perform that action at this time.
0 commit comments