Skip to content

Commit

Permalink
use TypeAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Nov 14, 2024
1 parent bb263b6 commit 3686c44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zha/zigbee/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from enum import Enum, StrEnum
from typing import TYPE_CHECKING, Any, Literal, Union
from typing import TYPE_CHECKING, Any, Literal, TypeAlias, Union

from pydantic import field_serializer, field_validator
from zigpy.types import uint1_t, uint8_t
Expand Down Expand Up @@ -225,7 +225,7 @@ class EndpointNameInfo(BaseModel):
name: str


EntityInfoUnion = (
EntityInfoUnion: TypeAlias = (
SirenEntityInfo
| SelectEntityInfo
| NumberEntityInfo
Expand Down Expand Up @@ -308,7 +308,7 @@ class GroupMemberInfo(BaseModel):
entities: dict[str, EntityInfoUnion]


GroupEntityUnion = LightEntityInfo | FanEntityInfo | SwitchEntityInfo
GroupEntityUnion: TypeAlias = LightEntityInfo | FanEntityInfo | SwitchEntityInfo

if not TYPE_CHECKING:
GroupEntityUnion = as_tagged_union(GroupEntityUnion)
Expand Down

0 comments on commit 3686c44

Please sign in to comment.