Replace | typing usage with Optional and Union

This commit is contained in:
Josh Wu
2023-09-12 15:45:05 +08:00
parent 1e00c8f456
commit f39f5f531c
8 changed files with 19 additions and 11 deletions

View File

@@ -17,6 +17,8 @@
# -----------------------------------------------------------------------------
import logging
from typing import Optional
from .common import Transport
from .file import open_file_transport
@@ -27,7 +29,7 @@ logger = logging.getLogger(__name__)
# -----------------------------------------------------------------------------
async def open_vhci_transport(spec: str | None) -> Transport:
async def open_vhci_transport(spec: Optional[str]) -> Transport:
'''
Open a VHCI transport (only available on some platforms).
The parameter string is either empty (to use the default VHCI device