@@ -171,7 +171,9 @@ def _identify_improvement_areas(
171171 improvement_areas = []
172172
173173 # Check program length
174- if len (current_program ) > 500 :
174+ # Support both old and new parameter names for backward compatibility
175+ threshold = self .config .suggest_simplification_after_chars or self .config .code_length_threshold
176+ if threshold and len (current_program ) > threshold :
175177 improvement_areas .append (
176178 "Consider simplifying the code to improve readability and maintainability"
177179 )
@@ -499,7 +501,7 @@ def _extract_unique_features(self, program: Dict[str, Any]) -> str:
499501 metadata = program .get ("metadata" , {})
500502 if "changes" in metadata :
501503 changes = metadata ["changes" ]
502- if isinstance (changes , str ) and len (changes ) < 100 :
504+ if isinstance (changes , str ) and self . config . include_changes_under_chars and len (changes ) < self . config . include_changes_under_chars :
503505 features .append (f"Modification: { changes } " )
504506
505507 # Analyze metrics for standout characteristics
@@ -521,9 +523,9 @@ def _extract_unique_features(self, program: Dict[str, Any]) -> str:
521523 features .append ("NumPy-based implementation" )
522524 if "for" in code_lower and "while" in code_lower :
523525 features .append ("Mixed iteration strategies" )
524- if len (code .split ("\n " )) < 10 :
526+ if self . config . concise_implementation_max_lines and len (code .split ("\n " )) <= self . config . concise_implementation_max_lines :
525527 features .append ("Concise implementation" )
526- elif len (code .split ("\n " )) > 50 :
528+ elif self . config . comprehensive_implementation_min_lines and len (code .split ("\n " )) >= self . config . comprehensive_implementation_min_lines :
527529 features .append ("Comprehensive implementation" )
528530
529531 # Default if no specific features found
0 commit comments