[core] Defer voluptuous and bundle imports out of the upload and logs fast path (#18093)

This commit is contained in:
J. Nick Koston
2026-08-05 20:39:19 +00:00
committed by GitHub
parent f2472563f4
commit a2d1f73bca
10 changed files with 150 additions and 61 deletions
-21
View File
@@ -25,7 +25,6 @@ from esphome.bundle import (
add_bundle_file,
add_secret_scan_dir,
extract_bundle,
is_bundle_path,
prepare_bundle_for_compile,
read_bundle_manifest,
remap_bundle_path,
@@ -99,26 +98,6 @@ def _setup_config_dir(
return config_dir
# ---------------------------------------------------------------------------
# is_bundle_path
# ---------------------------------------------------------------------------
@pytest.mark.parametrize(
("filename", "expected"),
[
(f"my_device{BUNDLE_EXTENSION}", True),
(f"MY_DEVICE{BUNDLE_EXTENSION.upper()}", True),
("my_device.yaml", False),
("my_device.tar.gz", False),
("my_device.zip", False),
("", False),
],
)
def test_is_bundle_path(filename: str, expected: bool) -> None:
assert is_bundle_path(Path(filename)) is expected
# ---------------------------------------------------------------------------
# _default_target_dir
# ---------------------------------------------------------------------------