This commit is contained in:
J. Nick Koston 2025-07-06 13:24:50 -05:00
parent ef98f42e7e
commit a1f63c0dfc
No known key found for this signature in database

View File

@ -11,16 +11,8 @@ import tempfile
from typing import TYPE_CHECKING
from urllib.parse import urlparse
from esphome.const import (
KEY_CORE,
KEY_TARGET_FRAMEWORK,
KEY_TARGET_PLATFORM,
PlatformFramework,
)
from esphome.core import CORE
if TYPE_CHECKING:
pass # PlatformFramework is already imported above
from esphome.const import PlatformFramework
_LOGGER = logging.getLogger(__name__)
@ -532,7 +524,14 @@ def filter_source_files_from_platform(
Returns:
Function that returns list of files to exclude for current platform
"""
from esphome.const import PlatformFramework
# Import here to avoid circular imports
from esphome.const import (
KEY_CORE,
KEY_TARGET_FRAMEWORK,
KEY_TARGET_PLATFORM,
PlatformFramework,
)
from esphome.core import CORE
# Pre-build lookup map from (platform, framework) tuples to PlatformFramework enum
_PLATFORM_FRAMEWORK_LOOKUP = {pf.value: pf for pf in PlatformFramework}