mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user