From a21e365c4e4f91541140c2261b08518e9d3ff34e Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Mon, 19 Oct 2026 18:50:41 +0200 Subject: [PATCH] fix: annotate the unit path set so mypy accepts service_packages (NetOrk/netork#1236) --- napalm_device_types/service_packages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/napalm_device_types/service_packages.py b/napalm_device_types/service_packages.py index c0dc146..f65068a 100644 --- a/napalm_device_types/service_packages.py +++ b/napalm_device_types/service_packages.py @@ -82,7 +82,8 @@ def _report(output: str) -> Dict[str, List[str]]: def _units(lines: List[str]) -> Dict[str, Set[str]]: """``systemctl show`` blocks -> ``{unit: its unit file and binary}``.""" units: Dict[str, Set[str]] = {} - unit, paths = "", set() + unit = "" + paths: Set[str] = set() for line in [*lines, ""]: key, _, value = line.partition("=") if not line.strip():