lukestanley commited on
Commit
4901d0f
1 Parent(s): 00af17e

Add assert in improvement_loop function to make more robust

Browse files
Files changed (1) hide show
  1. chill.py +1 -1
chill.py CHANGED
@@ -144,7 +144,7 @@ def improvement_loop(input_text):
144
  except ValueError as e:
145
  print("ValueError:", e)
146
  continue
147
-
148
  return suggestions[0]
149
 
150
 
 
144
  except ValueError as e:
145
  print("ValueError:", e)
146
  continue
147
+ assert len(suggestions) > 0
148
  return suggestions[0]
149
 
150