fixed ruff issues (#1549)

This commit is contained in:
Oleg A. 2024-08-01 01:37:07 +03:00 committed by GitHub
parent 2516f32168
commit 98c2a4fb57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View file

@ -171,7 +171,7 @@ class Text(Iterable[NodeType]):
def __add__(self, other: NodeType) -> "Text":
if isinstance(other, Text) and other.type == self.type and self._params == other._params:
return type(self)(*self, *other, **self._params)
if type(self) == Text and isinstance(other, str):
if type(self) is Text and isinstance(other, str):
return type(self)(*self, other, **self._params)
return Text(self, other)