iammahmads commited on
Commit
40f97bf
ยท
verified ยท
1 Parent(s): 9c51460

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,9 +60,9 @@ class CodeCopilot:
60
  def generate_suggestions(self, patterns):
61
  """Generate suggestions based on detected patterns"""
62
  suggestions = []
63
- if patterns['function_def'] > 3:
64
  suggestions.append("๐Ÿ” Consider breaking down into smaller functions or using a class structure.")
65
- if patterns['loop'] > 2:
66
  suggestions.append("๐Ÿ”„ You might benefit from list comprehensions or map/filter functions.")
67
  if patterns['conditional'] > 3:
68
  suggestions.append("โš– Complex conditionals might be simplified using polymorphism or strategy pattern.")
 
60
  def generate_suggestions(self, patterns):
61
  """Generate suggestions based on detected patterns"""
62
  suggestions = []
63
+ if patterns['function_def'] >= 1:
64
  suggestions.append("๐Ÿ” Consider breaking down into smaller functions or using a class structure.")
65
+ if patterns['loop'] >= 2:
66
  suggestions.append("๐Ÿ”„ You might benefit from list comprehensions or map/filter functions.")
67
  if patterns['conditional'] > 3:
68
  suggestions.append("โš– Complex conditionals might be simplified using polymorphism or strategy pattern.")