Skip to content

Commit cbd232a

Browse files
thomasballingersebastinas
authored andcommitted
Fix 181
1 parent b2aaae8 commit cbd232a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

curtsies/formatstringarray.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ def __setitem__(self, slicetuple, value):
152152
string please use a list [] with strings for the
153153
contents of each row"""
154154
)
155+
if slicesize(colslice) > 1 and isinstance(value, FmtStr):
156+
raise ValueError(
157+
"""You cannot replace a multi column slice with a
158+
formatted string (FmtStr), please use a list [] with strings for the
159+
contents of each row"""
160+
)
155161
if slicesize(rowslice) != len(value):
156162
area = slicesize(rowslice) * slicesize(colslice)
157163
val_len = sum(len(i) for i in value)

0 commit comments

Comments
 (0)