Skip to content

Commit fdae5e9

Browse files
committed
micro optimizations
1 parent 8992c54 commit fdae5e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/textual/content.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,13 +748,13 @@ def __add__(self, other: Content | str) -> Content:
748748
offset = len(self.plain)
749749
content = Content(
750750
self.plain + other.plain,
751-
[
752-
*self._spans,
753-
*[
751+
(
752+
self._spans
753+
+ [
754754
Span(start + offset, end + offset, style)
755755
for start, end, style in other._spans
756-
],
757-
],
756+
]
757+
),
758758
(self.cell_length + other.cell_length),
759759
)
760760
return content
@@ -1093,7 +1093,7 @@ def stylize(
10931093
return self
10941094
return Content(
10951095
self.plain,
1096-
[*self._spans, Span(start, length if length < end else end, style)],
1096+
self._spans + [Span(start, length if length < end else end, style)],
10971097
)
10981098

10991099
def stylize_before(

0 commit comments

Comments
 (0)