From 90846abe6e52f8ab3a59f6c62cda8bf918b6042c Mon Sep 17 00:00:00 2001 From: Saga4 Date: Thu, 5 Jun 2025 01:31:53 +0530 Subject: [PATCH] fix_duplication_suggestion_issue --- codeflash/discovery/functions_to_optimize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codeflash/discovery/functions_to_optimize.py b/codeflash/discovery/functions_to_optimize.py index 3f0d72bcd..41d99ec2c 100644 --- a/codeflash/discovery/functions_to_optimize.py +++ b/codeflash/discovery/functions_to_optimize.py @@ -476,12 +476,14 @@ def filter_functions( if blocklist_funcs: functions_tmp = [] for function in _functions: - if not ( + if ( function.file_path.name in blocklist_funcs and function.qualified_name in blocklist_funcs[function.file_path.name] ): + # This function is in blocklist, we can skip it blocklist_funcs_removed_count += 1 continue + # This function is NOT in blocklist. we can keep it functions_tmp.append(function) _functions = functions_tmp