mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Fix str() + Content()
This commit is contained in:
@@ -760,10 +760,10 @@ class Content(Visual):
|
||||
return content
|
||||
return NotImplemented
|
||||
|
||||
def __radd__(self, other: Content | str) -> Content:
|
||||
if not isinstance(other, (Content, str)):
|
||||
def __radd__(self, other: str) -> Content:
|
||||
if not isinstance(other, str):
|
||||
return NotImplemented
|
||||
return self + other
|
||||
return Content(other) + self
|
||||
|
||||
@classmethod
|
||||
def _trim_spans(cls, text: str, spans: list[Span]) -> list[Span]:
|
||||
|
||||
Reference in New Issue
Block a user