Clean up codespell words (#123541)
This commit is contained in:
parent
257742de46
commit
13b12a7657
7 changed files with 18 additions and 20 deletions
|
@ -168,11 +168,9 @@ def invalid_msg(
|
|||
gateway: BaseAsyncGateway, child: ChildSensor, value_type_name: ValueType
|
||||
) -> str:
|
||||
"""Return a message for an invalid child during schema validation."""
|
||||
pres = gateway.const.Presentation
|
||||
presentation = gateway.const.Presentation
|
||||
set_req = gateway.const.SetReq
|
||||
return (
|
||||
f"{pres(child.type).name} requires value_type {set_req[value_type_name].name}"
|
||||
)
|
||||
return f"{presentation(child.type).name} requires value_type {set_req[value_type_name].name}"
|
||||
|
||||
|
||||
def validate_set_msg(
|
||||
|
@ -202,10 +200,10 @@ def validate_child(
|
|||
) -> defaultdict[Platform, list[DevId]]:
|
||||
"""Validate a child. Returns a dict mapping hass platform names to list of DevId."""
|
||||
validated: defaultdict[Platform, list[DevId]] = defaultdict(list)
|
||||
pres: type[IntEnum] = gateway.const.Presentation
|
||||
presentation: type[IntEnum] = gateway.const.Presentation
|
||||
set_req: type[IntEnum] = gateway.const.SetReq
|
||||
child_type_name: SensorType | None = next(
|
||||
(member.name for member in pres if member.value == child.type), None
|
||||
(member.name for member in presentation if member.value == child.type), None
|
||||
)
|
||||
if not child_type_name:
|
||||
_LOGGER.warning("Child type %s is not supported", child.type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue