Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions curtsies/formatstringarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ def __setitem__(self, slicetuple, value):
string please use a list [] with strings for the
contents of each row"""
)
if slicesize(colslice) > 1 and isinstance(value, FmtStr):
raise ValueError(
"""You cannot replace a multi column slice with a
formatted string (FmtStr), please use a list [] with strings for the
contents of each row"""
)
if slicesize(rowslice) != len(value):
area = slicesize(rowslice) * slicesize(colslice)
val_len = sum(len(i) for i in value)
Expand Down
Loading