From ac7a892965212607d2d5467b789e2bf3ba56546d Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 24 May 2023 14:41:11 +0100 Subject: [PATCH] Link most(all?) docstring mentions of SelectionList Putting the hype in hypertext. --- src/textual/widgets/_selection_list.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/textual/widgets/_selection_list.py b/src/textual/widgets/_selection_list.py index 6af898043..cc877b1bd 100644 --- a/src/textual/widgets/_selection_list.py +++ b/src/textual/widgets/_selection_list.py @@ -274,7 +274,7 @@ class SelectionList(Generic[SelectionType], OptionList): state_change: The state change function to apply. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ # Keep track of if anything changed. @@ -316,7 +316,7 @@ class SelectionList(Generic[SelectionType], OptionList): selection: The selection to mark as selected. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ if self._select( selection.value @@ -357,7 +357,7 @@ class SelectionList(Generic[SelectionType], OptionList): selection: The selection to mark as not selected. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ if self._deselect( selection.value @@ -371,7 +371,7 @@ class SelectionList(Generic[SelectionType], OptionList): """Deselect all items. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ return self._apply_to_all(self._deselect) @@ -397,7 +397,7 @@ class SelectionList(Generic[SelectionType], OptionList): selection: The selection to toggle. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ self._toggle( selection.value @@ -411,7 +411,7 @@ class SelectionList(Generic[SelectionType], OptionList): """Toggle all items. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. """ return self._apply_to_all(self._toggle) @@ -533,7 +533,7 @@ class SelectionList(Generic[SelectionType], OptionList): def _on_option_list_option_highlighted( self, event: OptionList.OptionHighlighted ) -> None: - """Capture the `OptionList` highlight event and turn it into a `SelectionList` event. + """Capture the `OptionList` highlight event and turn it into a [`SelectionList`][textual.widgets.SelectionList] event. Args: event: The event to capture and recreate. @@ -606,7 +606,7 @@ class SelectionList(Generic[SelectionType], OptionList): items: The new items to add. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. Raises: DuplicateID: If there is an attempt to use a duplicate ID. @@ -650,7 +650,7 @@ class SelectionList(Generic[SelectionType], OptionList): item: The new item to add. Returns: - The `SelectionList` instance. + The [`SelectionList`][textual.widgets.SelectionList] instance. Raises: DuplicateID: If there is an attempt to use a duplicate ID.