Use PEP 695 for simple type aliases (#117633)
This commit is contained in:
parent
4edee94a81
commit
87bb7ced79
78 changed files with 139 additions and 140 deletions
|
@ -6,7 +6,7 @@ import asyncio
|
|||
from copy import deepcopy
|
||||
from itertools import chain
|
||||
import re
|
||||
from typing import TypeAlias, cast
|
||||
from typing import cast
|
||||
|
||||
import pypck
|
||||
import voluptuous as vol
|
||||
|
@ -60,12 +60,10 @@ from .const import (
|
|||
)
|
||||
|
||||
# typing
|
||||
AddressType = tuple[int, int, bool]
|
||||
DeviceConnectionType: TypeAlias = (
|
||||
pypck.module.ModuleConnection | pypck.module.GroupConnection
|
||||
)
|
||||
type AddressType = tuple[int, int, bool]
|
||||
type DeviceConnectionType = pypck.module.ModuleConnection | pypck.module.GroupConnection
|
||||
|
||||
InputType = type[pypck.inputs.Input]
|
||||
type InputType = type[pypck.inputs.Input]
|
||||
|
||||
# Regex for address validation
|
||||
PATTERN_ADDRESS = re.compile(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue