mirror of
https://github.com/home-assistant/core
synced 2024-10-06 02:38:04 +00:00
Fix shadowing of outer name in config_validation (#82088)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
parent
987b840665
commit
4f7b583f19
|
@ -914,9 +914,9 @@ def key_value_schemas(
|
|||
with contextlib.suppress(vol.Invalid):
|
||||
return cast(dict[Hashable, Any], default_schema(value))
|
||||
|
||||
alternatives = ", ".join(str(key) for key in value_schemas)
|
||||
alternatives = ", ".join(str(alternative) for alternative in value_schemas)
|
||||
if default_description:
|
||||
alternatives += ", " + default_description
|
||||
alternatives = f"{alternatives}, {default_description}"
|
||||
raise vol.Invalid(
|
||||
f"Unexpected value for {key}: '{key_value}'. Expected {alternatives}"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue