From 9c0df44b592e32669581ccf6ec4b2f847faf3457 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 24 May 2023 14:35:13 +0100 Subject: [PATCH] Supply the generic type when creating a Selection I don't think this is *needed* as such, but it seems like the sensible thing to do. --- src/textual/widgets/_selection_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/widgets/_selection_list.py b/src/textual/widgets/_selection_list.py index d37654303..6af898043 100644 --- a/src/textual/widgets/_selection_list.py +++ b/src/textual/widgets/_selection_list.py @@ -446,7 +446,7 @@ class SelectionList(Generic[SelectionType], OptionList): ) else: raise SelectionError(f"Expected 2 or 3 values, got {len(selection)}") - selection = Selection(label, value, selected) + selection = Selection[SelectionType](label, value, selected) # At this point we should have a proper selection. assert isinstance(selection, Selection)