From 14628ab3a5160cf132ae869907cc6b741a64f582 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 15 May 2026 01:41:44 -0700 Subject: [PATCH] [store_yaml] Add return type annotation on _import_zstd --- esphome/components/store_yaml/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/store_yaml/__init__.py b/esphome/components/store_yaml/__init__.py index fa25f36592..55fc047d76 100644 --- a/esphome/components/store_yaml/__init__.py +++ b/esphome/components/store_yaml/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging from pathlib import Path import struct +from types import ModuleType import esphome.codegen as cg import esphome.config_validation as cv @@ -35,7 +36,7 @@ CONFIG_SCHEMA = cv.Schema( ).extend(cv.COMPONENT_SCHEMA) -def _import_zstd(): +def _import_zstd() -> ModuleType: try: from compression import zstd # noqa: PLC0415 — Python 3.14+ stdlib except ImportError: