Spaces:
Sleeping
Sleeping
Commit
·
4901d0f
1
Parent(s):
00af17e
Add assert in improvement_loop function to make more robust
Browse files
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 |
|