mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Ensure selection casting works in earlier Pythons
This commit is contained in:
@@ -203,11 +203,11 @@ class SelectionList(Generic[SelectionType], OptionList):
|
||||
"""
|
||||
if len(selection) == 3:
|
||||
label, value, selected = cast(
|
||||
tuple[TextType, SelectionType, bool], selection
|
||||
"tuple[TextType, SelectionType, bool]", selection
|
||||
)
|
||||
elif len(selection) == 2:
|
||||
label, value, selected = cast(
|
||||
tuple[TextType, SelectionType, bool], (*selection, False)
|
||||
"tuple[TextType, SelectionType, bool]", (*selection, False)
|
||||
)
|
||||
else:
|
||||
# TODO: Proper error.
|
||||
|
||||
Reference in New Issue
Block a user