mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 22:56:37 +00:00
py39
This commit is contained in:
parent
f0f5f23213
commit
df389527a0
@ -2266,8 +2266,8 @@ def rename_key(old_key, new_key):
|
|||||||
|
|
||||||
def _deprecated_or_removed(
|
def _deprecated_or_removed(
|
||||||
key: str,
|
key: str,
|
||||||
replacement_key: str | None,
|
replacement_key: Optional[str],
|
||||||
default: Any | None,
|
default: Optional[Any],
|
||||||
raise_if_present: bool,
|
raise_if_present: bool,
|
||||||
option_removed: bool,
|
option_removed: bool,
|
||||||
) -> Callable[[dict], dict]:
|
) -> Callable[[dict], dict]:
|
||||||
@ -2337,9 +2337,9 @@ def _deprecated_or_removed(
|
|||||||
|
|
||||||
def deprecated(
|
def deprecated(
|
||||||
key: str,
|
key: str,
|
||||||
replacement_key: str | None = None,
|
replacement_key: Optional[str] = None,
|
||||||
default: Any | None = None,
|
default: Optional[Any] = None,
|
||||||
raise_if_present: bool | None = False,
|
raise_if_present: Optional[bool] = False,
|
||||||
) -> Callable[[dict], dict]:
|
) -> Callable[[dict], dict]:
|
||||||
"""Log key as deprecated and provide a replacement (if exists).
|
"""Log key as deprecated and provide a replacement (if exists).
|
||||||
|
|
||||||
@ -2363,8 +2363,8 @@ def deprecated(
|
|||||||
|
|
||||||
def removed(
|
def removed(
|
||||||
key: str,
|
key: str,
|
||||||
default: Any | None = None,
|
default: Optional[Any] = None,
|
||||||
raise_if_present: bool | None = True,
|
raise_if_present: Optional[bool] = True,
|
||||||
) -> Callable[[dict], dict]:
|
) -> Callable[[dict], dict]:
|
||||||
"""Log key as deprecated and fail the config validation.
|
"""Log key as deprecated and fail the config validation.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user