Revert "Typing"

This reverts commit 8a57f772ca.
pull/65170/head
Aaron Bach 2022-01-28 22:42:05 -07:00
parent 8a57f772ca
commit 67525c62a2
1 changed files with 4 additions and 4 deletions

View File

@ -2,17 +2,17 @@
from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any
from typing import Any, TypeVar
from homeassistant.core import callback
from .const import REDACTED
T = TypeVar("T")
@callback
def async_redact_data(
data: list | dict[str, Any], to_redact: Iterable[Any]
) -> list | dict[str, Any]:
def async_redact_data(data: T, to_redact: Iterable[Any]) -> T:
"""Redact sensitive data in a dict."""
if not isinstance(data, (Mapping, list)):
return data