From f2eeebc3a1b0519cea40ab20b2033e783f5abe80 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 23 Aug 2026 13:19:19 -0500 Subject: [PATCH] Type the prefetch tracker --- esphome/platformio/registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/platformio/registry.py b/esphome/platformio/registry.py index 0254e2dbff..eee20958e9 100644 --- a/esphome/platformio/registry.py +++ b/esphome/platformio/registry.py @@ -3,7 +3,7 @@ platformio package (identical bits, esphome's own download machinery).""" from __future__ import annotations -from collections.abc import Collection +from collections.abc import Callable, Collection from functools import partial import io import json @@ -198,7 +198,7 @@ def prefetch_packages( ", ".join(entry.name for entry in pending), ) - def _fetch(entry: _PendingArchive, tracker) -> None: + def _fetch(entry: _PendingArchive, tracker: Callable[[int], None]) -> None: entry.dest.parent.mkdir(parents=True, exist_ok=True) with FileLock(f"{entry.dest}.lock", fallback_to_soft=False): download_with_resume(