resolved RESOLVED UNSUBMITTED PASS · None tool calls · 0 s · Textualize/rich
fix infinite loop in append Fixes https://github.com/Textualize/rich/issues/3479
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
--- a/rich/text.py
+++ b/rich/text.py
@@ -998,7 +998,7 @@ def append(
self._text.append(text.plain)
self._spans.extend(
_Span(start + text_length, end + text_length, style)
- for start, end, style in text._spans
+ for start, end, style in text._spans.copy()
)
self._length += len(text)
return self
@@ -1020,7 +1020,7 @@ def append_text(self, text: "Text") -> "Text":
self._text.append(text.plain)
self._spans.extend(
_Span(start + text_length, end + text_length, style)
- for start, end, style in text._spans
+ for start, end, style in text._spans.copy()
)
self._length += len(text)
return self........................................................................ [ 66%] ..................................... [100%] 109 passed in 0.19s