mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Simplify ImmutableSequence.__bool__
This commit is contained in:
@@ -42,7 +42,7 @@ class ImmutableSequence(Generic[T]):
|
||||
return len(self)
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
return bool(len(self))
|
||||
return bool(self._list)
|
||||
|
||||
def __contains__(self, item: T) -> bool:
|
||||
return item in self._list
|
||||
|
||||
Reference in New Issue
Block a user