Update voluptuous to 0.15.2 (#120631)
* Update voluptuous to 0.15.1 * Fix typing issues * Add type ignores for json result type * Update voluptuous to 0.15.2 --------- Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
0d0ca22103
commit
0e52d149e4
11 changed files with 13 additions and 15 deletions
|
@ -5,7 +5,7 @@ from __future__ import annotations
|
|||
from collections.abc import Mapping
|
||||
from contextlib import suppress
|
||||
from enum import StrEnum
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
@ -90,7 +90,7 @@ async def _async_validate_config_item( # noqa: C901
|
|||
def _humanize(err: Exception, config: ConfigType) -> str:
|
||||
"""Humanize vol.Invalid, stringify other exceptions."""
|
||||
if isinstance(err, vol.Invalid):
|
||||
return cast(str, humanize_error(config, err))
|
||||
return humanize_error(config, err)
|
||||
return str(err)
|
||||
|
||||
def _log_invalid_automation(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue