Skip to content

Commit 09a1b71

Browse files
committed
typing
1 parent 42ea82e commit 09a1b71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shiny/playwright/controller/_input_controls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ def set(
12131213
item_loc = self._loc_events.locator("> .item").nth(i)
12141214
item_data_value = item_loc.get_attribute("data-value")
12151215

1216-
def delete_item() -> None:
1216+
def delete_item(item_loc: Locator) -> None:
12171217
"""
12181218
Deletes the item by clicking on it and pressing the Delete key.
12191219
"""
@@ -1222,19 +1222,19 @@ def delete_item() -> None:
12221222

12231223
# If the item has no data-value, remove it
12241224
if item_data_value is None:
1225-
delete_item()
1225+
delete_item(item_loc)
12261226
continue
12271227

12281228
# If there are more items than selected, we need to remove the extra ones
12291229
if i >= len(selected):
1230-
delete_item()
1230+
delete_item(item_loc)
12311231
continue
12321232

12331233
selected_data_value = selected[i]
12341234

12351235
# If the item is not the next `selected` value, remove it
12361236
if item_data_value != selected_data_value:
1237-
delete_item()
1237+
delete_item(item_loc)
12381238
continue
12391239

12401240
# The item is the next `selected` value

0 commit comments

Comments
 (0)