From 46c83c8824437da727842afcebc8d5869485dc01 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 11 Sep 2025 19:28:54 -0500 Subject: [PATCH] fix type --- esphome/helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/helpers.py b/esphome/helpers.py index 7eb560646b..d37f549658 100644 --- a/esphome/helpers.py +++ b/esphome/helpers.py @@ -9,10 +9,14 @@ from pathlib import Path import platform import re import tempfile +from typing import TYPE_CHECKING from urllib.parse import urlparse from esphome.const import __version__ as ESPHOME_VERSION +if TYPE_CHECKING: + from esphome.address_cache import AddressCache + # Type aliases for socket address information AddrInfo = tuple[ int, # family (AF_INET, AF_INET6, etc.) @@ -174,7 +178,7 @@ def addr_preference_(res: AddrInfo) -> int: def resolve_ip_address( - host: str | list[str], port: int, address_cache: object | None = None + host: str | list[str], port: int, address_cache: AddressCache | None = None ) -> list[AddrInfo]: import socket