Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1k
fix: add set_options to SelectionList#6224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
fix: add set_options to SelectionList#6224
Conversation
threw me off when this happened to rovr, because the self._selectednever got cleared when `set_options` was used instead of `clear_options`+ `add_options`
waiting for a new release that hasTextualize/textual#6224 merged
TomJGooding left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Are you sure this is correct?You can build aSelectionList with tuples or Selection objects, but here it looks like you're trying to useSelectionType?
NSPC911 commentedNov 11, 2025
not really sure which one to use, given that |
TomJGooding commentedNov 12, 2025
I'm confused, Did you check your code actually worked, or just throw the PR over the wall? |
NSPC911 commentedNov 12, 2025
The general code worked, but I'm not sure about which class to use as the type hint for the function |
TomJGooding commentedNov 20, 2025
Sorry, I think I understand the problem now. I thought the signature would just be similar to the textual/src/textual/widgets/_selection_list.py Lines 629 to 637 in422852a
But of course this doesn't satisfy mypy and friends for I realise now that I overlooked that this actually ends up calling |
threw me off when this happened to rovr, because the self._selected never got cleared when
set_optionswas used instead ofclear_options+add_optionsPlease review the following checklist.