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:
Dave Pearson
2023-05-24 14:35:13 +01:00
parent a32cfdbe40
commit 9c0df44b59

View File

@@ -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)