From 86a48de59b2e36c3300db9649a505c90a14e1f0e Mon Sep 17 00:00:00 2001 From: Thomas Ballinger Date: Thu, 6 Nov 2025 23:34:27 -0800 Subject: [PATCH] Fix 181 --- curtsies/formatstringarray.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/curtsies/formatstringarray.py b/curtsies/formatstringarray.py index d63171f..24c906a 100644 --- a/curtsies/formatstringarray.py +++ b/curtsies/formatstringarray.py @@ -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)