Skip to content

Commit 1c47a55

Browse files
committed
Use Union for nav_factory type annotation
Replaces the use of the | operator with Union in the type annotation for nav_factory in test_navset_menu for improved compatibility and clarity.
1 parent 413c60b commit 1c47a55

File tree

1 file changed

+2
-1
lines changed
  • tests/playwright/shiny/components/nav/navset_menu

1 file changed

+2
-1
lines changed

tests/playwright/shiny/components/nav/navset_menu/test_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pytest
22
from playwright.sync_api import Page
3+
from typing import Union
34

45
from shiny.playwright import controller
56
from shiny.pytest import create_app_fixture
@@ -19,7 +20,7 @@
1920
def test_navset_menu(
2021
page: Page,
2122
app: ShinyAppProc,
22-
nav_factory: type[controller.NavsetPill] | type[controller.NavsetUnderline],
23+
nav_factory: Union[type[controller.NavsetPill], type[controller.NavsetUnderline]],
2324
nav_id: str,
2425
out_id: str,
2526
):

0 commit comments

Comments
 (0)