mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Tidy up some docstrings
Mainly adding missing return values, that sort of thing.
This commit is contained in:
@@ -267,6 +267,9 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
selection: The selection to mark as selected.
|
selection: The selection to mark as selected.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
"""
|
"""
|
||||||
if self._select(
|
if self._select(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -277,7 +280,11 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def select_all(self) -> Self:
|
def select_all(self) -> Self:
|
||||||
"""Select all items."""
|
"""Select all items.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
|
"""
|
||||||
return self._apply_to_all(self._select)
|
return self._apply_to_all(self._select)
|
||||||
|
|
||||||
def _deselect(self, value: SelectionType) -> bool:
|
def _deselect(self, value: SelectionType) -> bool:
|
||||||
@@ -301,6 +308,9 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
selection: The selection to mark as not selected.
|
selection: The selection to mark as not selected.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
"""
|
"""
|
||||||
if self._deselect(
|
if self._deselect(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -311,7 +321,11 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def deselect_all(self) -> Self:
|
def deselect_all(self) -> Self:
|
||||||
"""Deselect all items."""
|
"""Deselect all items.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
|
"""
|
||||||
return self._apply_to_all(self._deselect)
|
return self._apply_to_all(self._deselect)
|
||||||
|
|
||||||
def _toggle(self, value: SelectionType) -> bool:
|
def _toggle(self, value: SelectionType) -> bool:
|
||||||
@@ -334,6 +348,9 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
selection: The selection to toggle.
|
selection: The selection to toggle.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
"""
|
"""
|
||||||
self._toggle(
|
self._toggle(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -344,7 +361,11 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def toggle_all(self) -> Self:
|
def toggle_all(self) -> Self:
|
||||||
"""Toggle all items."""
|
"""Toggle all items.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The `SelectionList` instance.
|
||||||
|
"""
|
||||||
return self._apply_to_all(self._toggle)
|
return self._apply_to_all(self._toggle)
|
||||||
|
|
||||||
def _make_selection(
|
def _make_selection(
|
||||||
|
|||||||
Reference in New Issue
Block a user