Update Union typing (5) [Py310] (#86428)

This commit is contained in:
Marc Mueller
2023-01-23 09:06:26 +01:00
committed by GitHub
parent 8abce25948
commit 40be2324cc
6 changed files with 29 additions and 27 deletions
+5 -4
View File
@@ -5,7 +5,7 @@ import asyncio
from copy import deepcopy
from itertools import chain
import re
from typing import Union, cast
from typing import TypeAlias, cast
import pypck
import voluptuous as vol
@@ -60,9 +60,10 @@ from .const import (
# typing
AddressType = tuple[int, int, bool]
DeviceConnectionType = Union[
pypck.module.ModuleConnection, pypck.module.GroupConnection
]
DeviceConnectionType: TypeAlias = (
pypck.module.ModuleConnection | pypck.module.GroupConnection
)
InputType = type[pypck.inputs.Input]
# Regex for address validation