From 6e3f522d4b40898c7b21c3e0d89a15b081e2cefc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 30 Nov 2021 11:16:56 +0100 Subject: [PATCH] Fix StrEnum backport return type issue (#60610) --- homeassistant/util/enum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/util/enum.py b/homeassistant/util/enum.py index 88df4ba19c3..8bd01fa9ede 100644 --- a/homeassistant/util/enum.py +++ b/homeassistant/util/enum.py @@ -8,7 +8,7 @@ from typing import Any class StrEnum(str, Enum): """Partial backport of Python 3.11's StrEnum for our basic use cases.""" - def __new__(cls, value: str, *args: Any, **kwargs: Any) -> StrEnum: + def __new__(cls, value: str, *args: Any, **kwargs: Any): # type: ignore[no-untyped-def] """Create a new StrEnum instance.""" if not isinstance(value, str): raise TypeError(f"{value!r} is not a string")