Update Union typing (3) [Py310] (#86426)
This commit is contained in:
parent
4f87c1f30f
commit
ab76b3ffb3
8 changed files with 29 additions and 30 deletions
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
from abc import abstractmethod
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING, Generic, TypeVar, Union
|
||||
from typing import TYPE_CHECKING, Generic, TypeVar
|
||||
|
||||
import aiounifi
|
||||
from aiounifi.interfaces.api_handlers import (
|
||||
|
@ -31,8 +31,8 @@ from .const import ATTR_MANUFACTURER
|
|||
if TYPE_CHECKING:
|
||||
from .controller import UniFiController
|
||||
|
||||
DataT = TypeVar("DataT", bound=Union[APIItem, Outlet, Port])
|
||||
HandlerT = TypeVar("HandlerT", bound=Union[APIHandler, Outlets, Ports])
|
||||
DataT = TypeVar("DataT", bound=APIItem | Outlet | Port)
|
||||
HandlerT = TypeVar("HandlerT", bound=APIHandler | Outlets | Ports)
|
||||
SubscriptionT = Callable[[CallbackType, ItemEvent], UnsubscribeType]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue