Skip to content

Commit 8d7e974

Browse files
committed
use TypeAlias
1 parent d542e49 commit 8d7e974

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

zha/zigbee/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from enum import Enum, StrEnum
6-
from typing import TYPE_CHECKING, Any, Literal, Union
6+
from typing import TYPE_CHECKING, Any, Literal, TypeAlias, Union
77

88
from pydantic import field_serializer, field_validator
99
from zigpy.types import uint1_t, uint8_t
@@ -225,7 +225,7 @@ class EndpointNameInfo(BaseModel):
225225
name: str
226226

227227

228-
EntityInfoUnion = (
228+
EntityInfoUnion: TypeAlias = (
229229
SirenEntityInfo
230230
| SelectEntityInfo
231231
| NumberEntityInfo
@@ -308,7 +308,7 @@ class GroupMemberInfo(BaseModel):
308308
entities: dict[str, EntityInfoUnion]
309309

310310

311-
GroupEntityUnion = LightEntityInfo | FanEntityInfo | SwitchEntityInfo
311+
GroupEntityUnion: TypeAlias = LightEntityInfo | FanEntityInfo | SwitchEntityInfo
312312

313313
if not TYPE_CHECKING:
314314
GroupEntityUnion = as_tagged_union(GroupEntityUnion)

0 commit comments

Comments
 (0)